-
Browsing MSSQL and Vertica from CLI
Notes to make sure I don’t forget how to do this in the future. First, install
mssql
andvcli
tools:npm install -g sql-cli pip install vcli
Encrypt desired database account passwords:
mkdir -p ~/.passwd echo '$PASSWORD' | gpg --use-agent -e > ~/.passwd/$DB_ACCOUNT.gpg
Set up a set of aliases with the desired level of flexibility in
~/.bashrc
to avoid typing too much:function _sql-helper-command { host=$1 user=$2 password=$3 db=$4 opt_query_file=$5 if [ -z $opt_query_file ]; then mssql -s $host -u $user -p $password -d $db else mssql -s $host -u $user -p $password -d $db -q "`cat $opt_query_file`" fi } function _vsql-helper-command { host=$1 user=$2 password=$3 vcli -h $host -U $user -w $password } # Usage: `sql` for interactive mode, `sql filename.sql` to execute a file. function sql { opt_query_file=$1 host='$SOME_HOST' user='$SOME_USER' password=`gpg --use-agent --quiet --batch -d ~/.passwd/$SOME_FILENAME.gpg` db='$SOME_DB' _sql-helper-command $host $user $password $db $opt_query_file } # Usage: `vsql $VERTICA_HOST` function vsql { host=$1 user=`whoami` password=`gpg --use-agent --quiet --batch -d ~/.passwd/$SOME_FILENAME.gpg` _vsql-helper-command $host $user $password }
Replace
$SOME_USER
,$SOME_HOST
,$SOME_DB
,$SOME_FILENAME
above with specific user, host, DB, and filenames respectively. I usually make a bunch of aliases for different environments/machines I use:sql-prod
,sql-dev
,sql-local
orvsql-host1
,vsql-host2
. -
Thoughts on travel
I like traveling. I’ve been living on the road on and off for the past half a year, traveling across the US. This whole time I live in my car, and quite frankly, I enjoy it.
Passing beautiful vistas and not having a place to call home are two sides of the same coin. It’s something that gives me time to think.
From a very young age we surround ourselves with objects of comfort. It all starts with toys we have as children. First things we own. Our room. Friends. House. Job. Town. Country. We take comfort in certain parts of the environment. Be it objects, people, or places.
After getting rid of most of my belongings and starting my journey - I felt like a lot of things which made me feel comfortable and safe were gone. It made me feel very exposed to the world.
When objects of comfort are gone, one has to face a lot of their own demons. Issues hidden by a security blanket are let out to roam freely. Living on the road amplifies the experiences I have: the ups are high, and the downs are low. A wider specter of emotions is thrown onto me.
I guess there’s a reason why majority of people all live in a similar manner. It’s comforting. It’s a void inside you that needs filling. It’s things we don’t want to think about, deal with.
But there’s also strength in letting go. Items, places, people. Thoughts. Ideas. It’s a way of growth. To become a better version of yourself, you need to be destroyed a little. Deal with the darkness within.
Some days it’s exhausting, some days it’s revitalizing. But that’s why I do what I do.
-
Living in a car for 5000 miles
I have set on my journey across the United States and back a few months ago. It’s a fun thing to do, and really gave me a breath of fresh air. I watched elephant seals and whales on a California coast, spent what felt like days stuck in LA traffic, ran from a blizzard, made it through a flash flood, passed a tornado, celebrated New Year’s on the road…
But don’t let me get ahead of myself.
What’s inside
My path started in San Francisco Bay Area, a place I’ve been lately calling home. I tried out living out of a Prius before, thus not having a sturdy place to call home wasn’t really a shock. After only a few weeks I didn’t feel like anything is out of place - being on a road feels just as normal as renting a house.
Living areas
First - the packing and organization. Just like in any living space, zoning is important. Space inside a car is separated into 5 major areas:
- A driver’s seat, used solely for driving. No other activities are permitted, and the less time is spent in the driving seat - the better. This helps one to stay alert when on a road.
- Front passenger seat. There’s not enough room to sit here due to the seat being moved to the front all the way (to give the most space for the bed). I usually just keep a backpack here (which I always take with me, so this area stays empty when I’m not in the car).
- Rear passenger seat behind a driver. This is a primary seat for activities - reading, fiddling around with a laptop, having some tea or a snack. A cooler is taking up the leg space, but it’s never a problem: in the wilderness I put it outside, and nine times out of ten I don’t want to sit with my legs down (since that’s the position I drive in).
- A bed. Level surface, approximately 6 and a half feet long. Sleeping mat, winter queen sized sleeping bag folded in two as a second mattress, a summer sleeping bag, two pillows, and a plaid on top (for added coziness).
- Additional cargo storage under the bed. Water supply, out-of-season clothes, shoes.
- Cargo area in the rear. A suitcase with food and clothes, toiletry kit, and miscellaneous stuff. Some things I don’t access often are in a secondary cargo compartment Prius has underneath the cargo surface.
After about a week, moving between the areas within a car becomes surprisingly easy and natural. I usually put on a hand brake, lock the car, leave my shoes in a driver’s seat and move to the back sit or the bed.
Food, water, and cooking
Being prepared is essential for living on the road, so I keep a lot of food and water in the car. I make it a rule of thumb to keep 6-8 3-liter water jugs in the car, which amounts to 18-24 liters (5-6 gallons) of drinking water.
For boiling water I use RoadPro Smart Car Pot. I’ll upgrade to something better eventually, since it requires me to plan too far in advance - it takes 20-25 minutes to get water to boil.
I also have teabags and coffee with me. I used to have instant coffee, but it tastes terrible compared to the real thing. Now I use a simple one-cup coffee maker (the one where coffee drips through a funnel) to brew my pre-ground coffee.
When it comes to food - I use rice, grains, and pasta as a base for some meals. Canned goods like corn, peas, mixed veggies, pasta sauce, or chili add a nice touch to the base. I heat up canned soups with a backpacking stove when I’m not in the mood for cooking whole meals or doing the dishes.
I have a 16-qt Stanley Adventure Cooler which keeps items inside cold for nearly three days (or practically indefinitely if I’m up in the mountains where it’s cold). When I’m preparing to be out in the wild, I fill it up with eggs, meat, cheese, veggies, fruits, and berries.
In addition to everything listed above I always carry 6 days worth of MREs and water in an emergency backpack underneath in the cargo compartment in case I am ever stranded somewhere.
Washing the dishes
For cleaning my cookware I’m using a backpacking approach I’ve read about on WikiHow. I spray the dishes with some natural cleaning solution, let them sit for a bit, wipe it off with paper towels, and then thoroughly rinse degreased dishes off in a 5-liter travel kitchen sink.
Clothing
Most of my clothing is pretty regular - pants, T-shirts, shirts, cardigans, sweaters, jackets. However I did switch to using merino wool for all my base layers: underwear, socks, compression tops and bottoms. While being significantly more expensive, merino wool is much more comfortable to wear, and it stays clean for much longer than normal clothes.
All the things I wear day to day fit in a backpack. When I stayed in New York City for a few weeks without a car I had everything I needed in it:
In addition to all of the above, I carry a few pairs of shoes and an additional outer layer I wear when I anticipate to be near a campfire. That goes in a storage bin under the bed.
Laundry
I started with visiting laundromats and just carrying a lot of coins with me. But after a while, a number of items which require hand washing or delicate care have increased - mostly due to above specified merino wool base layers.
I’ve been looking for an excuse to try out Scrubba wash bag I’ve heard so much about - basically a dry sack for washing clothes. I found it to be quite convenient and not at all cumbersome to use.
While I still use laundromats for washing bulkier items, I hand wash my easy to clean and quick to dry base layers.
Sleeping
A self-inflating sleeping pad and a winter queen-sized sleeping bag folded in half create a great mattress. I sleep in a summer sleeping bag, with an added sleeping bag liner and a few travel pillows.
I run AC in the car throughout the night. While keeping the temperature pleasant, it tends to dry out the air and results in a major case of a sore throat in a morning. I use a small travel humidifier which connects to a USB power supply to regulate the humidity in the car at night.
Entertainment
Boredom seems to never be a concern with this lifestyle. I use laptop for rare acts of writing, and a Kindle for reading during the little downtime I have. I also have a little harmonica I hope I’ll learn to play one day. And some juggling balls I throw around once in a while.
A few words on stealth
While I enjoy staying at campsites, a large portion of my journey involved staying in urban areas. Looking inconspicious is a big deal when you’re relaxing in a car - it’s not fun when somebody comes knocking on your door (didn’t happen to me though).
The fact that it’s a white-ish Prius helps a lot. Car dwelling is not a first thing people think when they see a tiny city car parked on the side of the road. Tinted windows (heavier tint in the rear, lighter in the front) are enough to shield the dweller from the passers by. A blackout curtain separating the front seats from the back area and covering rear windows is enough to cover one from curious eyes peering inside the car.
Here’s how the car looks in ful lighting with the curtains down, if you look closely you can see the black fabric behind the seat backs. But most likely you’ll just pass the car:
Finding a place to stay boils down to four simple steps for me:
- Drive around in advance, find a place where it’s easy to blend it. I prefer a balance between empty and fully crowded lots. Avoid parking at a chosen area until later in the evening.
- Arrive late, hide in plain sight, park near similar cars. Don’t tuck in somewhere far and look suspicious.
- Be respectful to whichever place you picked for the night. If possible, leave it cleaner than it was when you arrived. Try not to be in and out of the car too much either.
- Leave early. Do not stay at one place multiple nights in a row. Avoid easily recognizable patterns when returning to the same spot.
Final thoughts about my journey
I traveled for an approximate of three weeks, and ended up hunkering down in New York City for another month while leaving a car outside the city.
I gave up my apartment back in Bay Area for the duration of the travel, and it feels liberating. It’s comforting to know that one doesn’t need to own a place to live a happy and fulfilled life. Even further, living in NYC for weeks with a single backpack worth of posessions and realising I don’t need anything else was an eye opening experience.
Turns out I really don’t need much stuff to enjoy life.
-
Prius camper conversion
As requested, I took some detailed pictures of the Prius Camper Conversion Kit I mentioned in my previous article. It adds valuable space to the back of the car when the seats are down, and helps to push down the seats all the way in order to achieve a level surface. This particular kit works for third generation of Prius, but can be slightly modified to fit other models. In theory, something like this can work with any car, as long as the rear seats can be forced down all the way to create a flat surface (170 pounds of my bodyweight was enough to flatten out the seat back).
This is how the final conversion looks, with a mat cut to a custom shape on top of it:
A wooden platform which is used to fill up rear leg space. Notice the blue strap on the rear seat, that’s what pushes down the seat to create a level surface:
The lid can be removed for storage space access:
It’s a relatively thin wooden platform. Top (on the picture) side of it is a bit slanted to fit on a rear seat back:
View from the bottom: metal pieces are there to hold platform legs when the platform is not in use, but I don’t find them necessary. Additional (darker) piece of wood is what the lid rests on:
View from the side:
With passenger front seat pushed all the way forward (and seat back in further possible forward position), wooden supports are inserted into exposed seat railing. I added some duct tape layers at the bottom of each leg so that they don’t wobble when the wooden platform is removed.
Here’s a right leg:
I noticed that the left leg needed to be approximately 5 mm longer in order for the platform not to wobble, so I extended it with whatever I had on hand:
Adjustable belt with a hook on one side and a strap tie on the other:
On the back side of rear seats there are places to secure a baby seat. I removed the plastic covers (use some force), and attached a strap there. I added a piece of cloth to (hopefully) prevent damage to seat fabric:
Tricky part is getting the bottom hook in the right place. Rear seats are held in place by two metal locks. If you grab a rear seat from the bottom (when the back is not folded) and pull up with approximately 50-100 pounds of force, the seat will snap out of the place exposing the lock. Attach a hook to the exposed part of the locking mechanism. Jump down on a seat to snap the rear seat back in place. Exercise caution while you make your way through this, took me nearly an hour to figure out how to properly attach a hook and snap the seat back in place:
When both sides of the belt are in place, fold the rear seat, push in down with your body weight, and tighten the belt.
-
Urban Prius living
Not so long ago I stumbled upon a blog titled “Hotel Prius”, and I loved the idea. Being a Prius owner myself, I decided to give Prius living a test run. Being cautious person I am, I decided to give it a test run for a week in a familiar area.
Preparing for the journey
First, I decided to tint my windows. In addition to making a Prius look much more pleasant, it keeps the car cooler throughout the day, and most importantly makes it hard to peek inside the car. Especially at night.
Next, I ordered a Prius Gen III Camping Sleeper Conversion Kit. It’s just a fancy name for two belts to push down the rear seats, and two wooden platforms with detachable feet to cover leg space. And two custom cut carpet runners to cover up the panels. Nothing one can’t make in their own garage, if the money is tight.
The kit requires front seats to be locked in the furthest possible position, rendering them unusable. So I only installed a panel behind a passenger seat. With the panel installed, I have nearly 7 feet of level surface to sleep on.
Another problem with the kit is that it blocks the console from being opened (arm rest storage between driver and passenger seat). I stopped using console as a quick access box, and it doesn’t feel like a big loss.
I packed all my clothes in a duffle bag, bought a small toiletries kit, and put the rest of my belongings in a backpack. Queen-sized sleeping bag I had came in handy as a bed (with a couple of travel pillows).
After a second night I swapped my sleeping bag with a lighter and more compact summer sleeping bag. That’s also when I added a 1.5 inch sleeping pad to my inventory.
My backpack/briefcase is on the passenger’s seat, I always take it with me.
In addition to all of the above, I took my guitar - even though it’s bigger than anything else I had to take with me, it’s a great source of entertainment.
If you’re feeling impatient, links to all the items are at the bottom of the post.
Sleeping in a Prius
Night one
First night in a Prius left me with mixed feelings. I parked in one of the corporate areas of the city at about 9 pm. I picked a well lit parking lot with some (but not much) evening traffic. I parked in one of the slightly darker areas of the parking lot (approximately one out of twenty parking spots was taken, and large number of cars made me feel safer).
It was 74F outside, slowly cooling after a 100F day. I left my car in accessory mode (spoiler: bad idea), turned on the AC, locked the doors, and hopped on my bedding arrangement to the back of the car. I didn’t want to keep the windows open since I just got them tinted. And sleeping with windows rolled down felt a bit eerie.
First thing I noticed was how obnoxiously bright instrument panel and GPS are. It was the opposite of stealthy, and it was plain annoying to sleep with those bright lights on. I reached out for my duffle bag, and pulled out a couple of towels to cover up both the instrument panel and GPS, as well as few AC control LEDs. This made me feel at ease, and I tried to doze off into sleep.
The parking lot lights were a minor annoyance, mostly filtered out by a 20% rear window tint. I’ve heard some people pass somewhere within 20 feet of my car a few times, but other than that it was quiet. Still, unfamiliar situation made it hard to fall asleep.
And then a few voices and an engine noise disturbed my peace, pretty close to my car. I waited for about 10 minutes, and the noise didn’t go away. I raised my head to see what’s happening - turns out someone had a tire blowout a 2 parking spots away from me, and a pickup truck pulled in next to them to help with changing the tire. There were anywhere between 3 and 5 people walking around and talking.
That’s when I quickly got dressed, climbed to a driver’s seat, and drove off to look for a quieter spot. It was 9:55 pm.
I went to a more secluded, but still well lit parking lot behind one of the offices. Concentration of cars was about the same, but it looked like those cars were left there overnight. I picked a spot within 50 feet of other parked cars, where a tree was covering my car from the harsh street light.
Accessory mode, AC, lock the doors. Climbed in the back, and after some restlessness (a fairly normal thing for me), I fell asleep. I woke up sometime around 11:30 pm. It was fairly hot in the car, and it was hard to breathe. Turns out accessory mode turned itself off at some point. Maybe the battery ran low, or maybe there’s a time limit of sort. I opened all the doors to air out a car for a couple of minutes while I walked around and stretched.
In the meantime, I also noticed that because of the tinted windows, it’s nearly impossible to see what’s inside the car while only standing a few feet away from it. That was comforting.
Second attempt, this time I turned on the car the usual way (by depressing the pedal). I used a foot brake for a peace of mind, set the AC to 68 degrees (with external air flow setting), locked the car, covered the instrument panel and a GPS, and climbed in the back.
AC was blowing on my neck, but I was too tired to worry about it. The car cooled down and I climbed inside a sleeping bag (it was too hot before, and I was just lying on top of it). I’m used to sleeping on hard surfaces, so the setup felt comfortable enough. The light from surrounding light poles was a bit too harsh, so I covered my eyes with a T-shirt. I fell asleep.
I woke up a few times throughout the night, but I feel like I’ve had enough sleep. I woke up with the sun at about 6:30 am, got dressed, opened all doors to ventilate the car, packed away a sleeping bag, and drove to work. I felt well rested, even though my throat and neck felt a bit sore from the AC directed at me.
Oh, and it cost me $1.40 to have an AC running through the night. The car would turn on for about a minute every once in a while (30 minutes?) to recharge the battery.
Night two
This time, I found a perfect spot in a small parking lot behind an office. Less crowded than the previous time, but still well lit. I got lucky and found a space with no direct street light being visible when laying down.
Turn the car on, AC to 68 degrees, lock the doors, hop to the back seat.
I’ve slept well for the first couple of hours, but I ended up waking up well rested at midnight. I stopped by my office and worked for a couple of hours. Back to the car to get 4 more hours of sleep.
It cost me $1.38 to camp through the night with AC on.
Night three
My sleeping bag was too hot to use at room temperature, so I swapped it with a summer down filled bag. I also purchased a self-inflating sleeping pad for more comfort.
Things are getting better from now on.
Feeling more confident, I found a four-story corporate parking lot and drove to the top level. I parked at a well-lit spot without any direct lights coming through the windows. I easily fell asleep a tad bit past nine, and woke up at 6 am refreshed and well rested. Secluded spot, comfortable sleeping pad, summer sleeping bag, and increased confidence - all contributed to making sleeping in a Prius a delightful experience.
This was also the night I learned a neat trick: if you recline the driver’s seat all the way, it becomes really easy to move between front seat and a sleeping area.
Cost of running the car through the night: $1.63.
Night four
I decided to camp out in the same multi-level parking garage I did yesterday (it has high enough number of cars so that I don’t stand out - about one per fifty parking spots; and the foot traffic is very low to non-existent). I found another part of the garage with a roof access on a second level and pulled in there. After getting situated, I realized I didn’t account for all the lights - bright parking lot lights from other levels ended up shining right in my face. And even though I knew I couldn’t be seen behind the tinted windows, it did leave me feeling exposed.
I slid to the driver’s seat and drove up a few levels to the previous spot. Doors are locked, AC is set to 68F, instrument panel is covered, driver’s seat is reclined. I climbed to the back, and fell asleep.
It was a warm night, temperature outside was at 73F. It was hot enough for me to wake up two times through the night, but that was a minor inconvenience.
Cost: $1.73.
Night five
It was one of the chillier nights, so sleeping was a very pleasant experience. I picked the same spot I used on the third night. Absence of direct lights visible from the car windows plays a huge role in making you feel safe.
Cost: $1.53 while also bringing Nexus 6 to a full charge.
Night six
Picked another spot in a similar area, I parked under a broken street light in a well lit parking lot. I’ve slept well. Mostly due to this being a cooler night (65F).
Cost: $1.29 while also bringing Nexus 6 to a full charge.
Night seven
I was stuck in traffic in the evening, and I fiddled with the GPS for a while. Turns out you can disable the obnoxiously bright screen by going into “Setup” -> “Display” -> “Screen off”. Pushing any button on the GPS turns the screen back on. I’m still using the towels to cover up the instrument panel and AC controls though.
Another fairly cold night, which made sleeping more comfortable. I went back to the top of the parking garage. Night was a delight.
Cost: $1.39, with full Nexus 6 charging.
Impressions
Stealthy living in a Prius is very comfortable. With tinted windows there’s just enough privacy, it’s safe and cheap to run AC through the night (cost averages to about $1.48 per night). There’s more than enough space for someone of my height (5’11”). It took me a couple of days to get used to feeling relatively exposed in public, but once I did - it was a breeze. Last five nights I have slept without any problems.
Surprisingly, I’ve slept better in a Prius than I did in my own bed. Here I should probably note that I’ve been having troubles sleeping on an off for some time lately, and sleeping through the night in a car was a step up from where I was before.
Lessons learned
Some things I didn’t know before trying out sleeping in a Prius:
- Pick a well lit parking lot, ideally with some cars of similar value parked overnight. Make sure there’s not too much foot traffic.
- Park in an area without direct light source near you. Also account for lights visible from inside the car (light nearly a hundred feet away can still be bother).
- If you’re using the AC, turn Prius engine on instead of leaving it in accessory mode.
- Proper AC vent direction is important. Fiddle with those until there are no drafts in the sleeping area.
- Use a sleeping mask to avoid being bothered by the lights if you couldn’t find area without visible light sources shining directly through the windows.
- Since the temperature inside the car is regulated, summer sleeping bag is a must.
- Sleeping pad is very helpful in making the surface softer. 1.5 inches made a huge difference in comfort.
Items I used
Here are the items directly related to the trip which I either purchased or already owned.
- Prius Gen III Camping Sleeper Conversion Kit. While not as good of a fit as something one can make with a garage and a set of tools, it’s a quick (but rather expensive, depending on your situation) solution.
- eBags TLS Mother Lode Weekender Convertible Junior.
- Kelty Cosmic 550 Dridown Sleeping Bag, Regular/41-Degree. I started a journey with a sleeping bag I already had around - winter Coleman Calgary Cold-Weather Scoop Sleeping Bag. Needless to say, Kelty Cosmic 41 is lighter, and by far more compact.
- Therm-a-Rest ProLite Plus Sleeping Pad. It’s a 1.5 inch tall matress, I found it to be extremely comfortable.
- REI Roadtripper Duffel - Medium. I don’t have too many clothes (and I live in California, taking winter clothing is out of the picture), so everything fits in a duffel bag.
- Eagle Creek Pack-It Clean/Dirty Cube. Holds underwear and socks, also doubles as a sealed laundry bag for both.
- Therm-a-Rest Compressible Travel Pillow, Medium. A comfortable pillow which goes under a sleeping bag.
- REI Grande Shower Kit. It’s fairly big and holds all my toiletries.
- Ready America Emergency Kit, 2-Person, 3-Day Backpack. Something I always have in a car for the peace of mind.
Future improvement ideas
I have a great stealthy setup, but having more privacy would’ve been a nice bonus. I’ll probably look for some inconspicuous looking shades or curtains, provided that the setup doesn’t look too obvious.
Philosophical implications
This was an interesting experience. Inability to retreat to the safety of my house got me out of my comfort zone. Initial discomfort passed quickly, and a world of possibilities opened up to me.
Not having access to a house made me, well, feel bored. And that’s amazing. Without having an ability to default to a TV, gaming platform, or even a laptop (it’s really not that comfortable to work on a laptop in a car) - I had to get creative. I got to play a guitar, a piano, sing, practice with a drum set. I worked on my blog (this article took multiple revisions and hours upon hours of time to look the way it does now). I went to Mozzart’s Don Giovanni publicly hosted in a nearby town.
And I finished this article, which took me about 8 days of revisions and additions to finish.
Now, thanks to self-imposed restrictions, I’m doing all the things I wanted to do.
I’m a perpetual planner. And that sometimes becomes a problem, since I’m always looking forward to the next thing that’s going to happen, sometimes not paying attention to life right in front of me. With everything I have packed in a car, there’s nothing on the horizon. Nothing is far away. There’s no home to go back to, so I don’t rush anywhere. I savor every moment I have.