Docker - Sync your clock

Setting the Timezone
By default docker containers will sync their clock with the system clock but the default timezone will be set to “UTC”. If we are using Date or Time in our application, we have to manually set the timezone for the container. One easy way to do so is by setting the environmental variable -e "TZ=Asia/Kolkata".

»
Author's profile picture ganesshkumar on docker

Docker - Disable Stream Buffers in Python

When running python application inside docker container, one may use print function for debugging. Usually it takes long time before you see anything on the screen as python tries to buffer the output to stdout and stderror. To force python to print immediately, set the environmental variable PYTHONUNBUFFERED=0 or run python with the flag -u inside the container. Both these force stdout and stderr stream to be unbuffered.

»
Author's profile picture ganesshkumar on docker

Passing Host's Hostname to Docker Container

There are two simple ways to pass hostname of the machine running docker daemon to the docker container using Ansible.

»
Author's profile picture ganesshkumar on docker

Privacy Plugins for Browsers

Here are some of my curated list of browser add-ons to protect your privacy against trackers and advertisers. Some of the add-ons might be available only on Firefox as it is my primary browser.

»
Author's profile picture ganesshkumar on privacy

Octopress Gist vs Include-code

I was using gist to share code snippets in this blog. Today I stumbled upon Pingdom, a tool to test the load time of that page, analyze it and find bottlenecks. I tested my blog and found that gist is taking approximately 300ms to load, which is bad. The average time taken to load my blog was 686ms and 300ms taken by gist is approximately 50% of the load time.

»
Author's profile picture ganesshkumar on computer, software, and octopress

Learn Docker While Migrating Octopress to Pelican

I rely on static site generators to write my blog. I am impressed with the ideology behind it. Keeping each and every component of the blog as small modules, templating webpages into separate components and writing markdown files for the static site generators to generate the blog is the way I enjoy to write blogs.

»
Author's profile picture ganesshkumar on computer, software, and docker

Upgrading Google Analytics in Octopress

Google Analytics for Octopress hasn’t integrated the latest update to include Demographics and Interest reports. In Octopress, Google Analytics code resides in source/_includes/google_analytics.html

»
Author's profile picture ganesshkumar on computer, software, and octopress

Using Spotify Outside US and UK

Spotify has been the best music streaming application I have used till date. Spotify is available to limited countries as of now. So if you are not from US or UK and want to use Spotify here is a simple work around.

»
Author's profile picture ganesshkumar on life style and hack

SEO in Octopress

In a html document, contains the metadata of the page in tags. Search engines use two meta elements keywords and description to index the page. The file /source/_includes/head.html is used by Octopress to add the meta information to the <head>

»
Author's profile picture ganesshkumar on computer, software, and octopress

Git Shallow Clone

I was trying to clone a fat git repository to my machine. It failed with the following error message.

»
Author's profile picture ganesshkumar on computer and git