How to deploy side projects as web services for free

In 2020, the web is still the most accessible permission-less platform. For the past few months, I have been playing and building side-projects to simplify my life. I started with a Calendar Bot for scheduling events, DeckSaver for downloading decks from Docsend, AutoSnoozer for email management, and StayInTouch for maintaining follow-ups.

When I started on this journey, I had the following in my mind.

  1. Cost of domain ~ 12$ a year or 1$ a month
  2. Cost of a VM ~ 10$ a month

Read More

Docker 101: A basic web-server displaying hello world

A basic webserver

Docker containers are small OS images in themselves which one can deploy and run without worrying about dependencies or interoperability. All the dependencies are packed in the same container file. And the docker runtime takes care of the interoperability. You are not tied to using a single language or framework. You can write code in Python, Go, Java, Node.js, or any of your favorite languages and pack it in a container.

Consider a simple example of a Go-based webserver

Read More

Lassen Volcanic National Park: The most family-friendly park near San Francisco

Lassen Volcanic Park has a lot to offer for everyone. The park has wide roads, and most tourist spots are easily accessible. Here’s what I would recommend

  1. Subway cave Lava tubes – easy 1/3 mile underground hike

    Lava Tubes Entrance

    Lava Tubes Entrance

  2. Hydrothermal Areas – Hydrothermal areas from where Sulpher escapes regularly. Some right next to the road and some accessible via a short hike.

    Sulpher bubbling in the background

    Sulpher bubbling in the background

  3. Walk and play on snow-covered areas – all along the park

Strenuous hikes

There are three strenuous hikes. I would only recommend one or two of these

  1. Lassen Peak – this one is snow-covered almost year-round
    Taken along the Lassen Peak hike

    Taken along the Lassen Peak hike

    At Lassen Peak

    At Lassen Peak

  2. Cinder Cone Nature Trail – This one is less strenuous compared to the other two. It is still hard due to the gravel-covered surfaceCinder Cone seen from the bottomCinder Cone seen from the bottom

    Cinder cone from the top

    Cinder cone from the top

  3. Brokeoff Mountain Trail – this can be snow-covered hike depending on the time of the year

    Brokeoff Mountain Trail

    Brokeoff Mountain Trail

Things to do in Yosemite National Park

Strenuous hikes

Half Dome hike

17-miles 12-hours with a breath-taking dangerous climb holding chains on the majestic half dome at the end. This hike requires a permit for the final half dome climb.

Hiking Half Dome

Hiking Half Dome

The Clouds Rest Trail

12-miles 7-hours hike. The trail ends at a point higher than the Half dome. One gets a great view of the park as well as the Half dome from here.

Half Dome as seen from Clouds Rest

Half Dome as seen from Clouds Rest

I would recommend doing only one of these two hikes in a single trip.

Scenic viewpoints and Small hikes

Yosemite falls

The lower falls are easily accessible with a short walk. The upper falls require a 6-mile hike. I only did the former.

Dry Yosemite Lower Falls during off-season

Dry Yosemite Lower Falls during the off-season

Bridalveil Falls

Another gorgeous falls accessible with a short 10-minute walk.

Bridal Veil Falls

Bridal Veil Falls

Glacier Point

Glacier Point provides a great view of the half dome for non-hikers. It is located about an hour away from Yosemite Valley and close to south exit towards Fresno. For hikers, I would recommend doing Sentinel Dome or Taft point; both are one-mile hikes with starting point about 2-miles drive from the Glacier Point.

Sentinel Dome

Sentinel Dome

Mariposa Grove of Giant Sequoias

Mariposa Grove has multiple hikes ranging from short walks to 7-mile hikes where one can see the giant sequoias. Due to time constraints, I only did the short hike here.

Where to stay

If you are doing in the Half Dome, then stay at the Yosemite Valley the previous night to start hiking early morning (4-5 AM). Curry Village has the cheapest lodging, and the camps are located conveniently inside the Yosemite valley. Book well in advance.

The park is huge. Roads wind around mountains and hilly. Driving inside the park can consume significant time, I would recommend planning for that in advance.

Troublshooting Android Emulator: “Emulator: Process finished with exit code 1”

Emulator: Process finished with exit code 1

You opened AVD Manager in Android Studio and tried to start an AVD, you got
“Emulator: Process finished with exit code 1”. Following are the steps to debug
this

  1. Find out the name of the emulator.
    Click the down arrow 🔽 which is to the right of play arrow ▶️, to find out the name of the AVD. Let’s say the name is “Nexus_5X_API_28_x86”.
  2. Try starting the AVD directly from command-line
    It fails with another cryptic error, but that’s at least more actionable

    Let’s retry in the verbose mode to see a detailed error

    So, the system image is missing.
  3. Install system image
  4. Now try starting the AVD again.

    Turns out there is another version of emulator installed in $(dirname $(dirname $(which android)))/emulator/emulator. And the emulator I was using is a stray one.

Two days in Minneapolis, Minnesota

Day 1

If you are arriving at MSP airport, then start your journey with the Mall of America. It is the largest shopping mall in the United States and is pretty close to the airport. Next, head to Minnehaha falls. It is the favorite fishing spot for the locals.

Minnehaha Falls

Minnehaha Falls

Hereafter, you can head towards the downtown. There isn’t much to do in downtown during the day time. And I would recommend checking out Sculpture Garden and the Lake of Isles in the evening.

Sculpture Garden

Sculpture Garden

Lake of Isles

Lake of Isles

Day 2

Start your day with Mill City Museum. The museum shows the history of Minnesota. You can see a beautiful view of St. Anthony’s Falls, the only natural waterfall on river Mississippi.  St. Anthony’s Falls provided hydropower and made Minnesota the hub of white flour production in the world. The museum gives a beautiful view of the Stone Arch Bridge as well.

St. Anthony's Waterfall

St. Anthony’s Waterfall

From there on, head to the Weisman Art Museum at the University of Minnesota. It is free and worth a small visit if you have time. Coming back to the downtown, Sidewalk Harp and Sculpture Clock are worth a shortstop.

Sidewalk Harp

Sidewalk Harp – walk below it to see the music play

Sculpture Clock

Sculpture Clock

In the evening, watch a live show at either  Brave New Workshop Comedy Theatre or The Lab Theatre.

Note: Most of the city, including the main airport, MSP, is well-connected via inexpensive public transport. So, you don’t need a rental car to get around.

Android: Using “Die with me” app without killing the phone’s battery

Die with me is a chat app which can be used only when the phone’s battery is below 5%.

Here is a fun way to use the app without draining your phone’s battery. Connect the phone via ADB or start Android emulator and fake the battery level to 4%.

And now, you can use the app. After playing with the app, reset the battery level with,

 

The first two statements of your BASH script should be…

The first statement is a Mac, GNU/Linux, and BSD portable way of finding the location of the bash interpreter. The second statement combines

    1. “set -e” which ensures that your script stops on first command failure. By default, when a command fails, BASH executes the next command. Looking at the logs, you might feel that the script executed successfully while some commands might have failed. Caveat: Be careful about applying it to existing scripts.
    2. “set -u” which ensures that your script exits on the first unset variable encountered. Otherwise, bash replaces the unset variables with empty default values.
    3. “set -o pipefail” which ensures that if any command in a set of piped commands failed, the overall exit status is the status of the failed command. Otherwise, the exit status is the status of the last command.

References:

  1. Unofficial Bash strict mode
  2. ExplainShell

Barcelona (Spain) in four days

Barcelona

  1. Public transport is good, get a Metro card with ten tickets, it can even be shared simultaneously.
  2. Beware of pickpockets.
  3. Credit card acceptance is high, but not 100%.
  4. Paella, a rice dish, is famous in Barcelona

Read More

Subscribe For Latest Updates

Signup for our newsletter and get member-only articles