OxDEAD Unicornz

Have you ever seen so many?

Few Notes on Golang Application Packaging for GAE

Once I decided to refactor onetimergo application introducing separate methods for Memcache and Data storage interaction I walked into package initiation problem. Approach I was using with a single onetimergo package didn’t work.

Everything was good till I tried to import onetimergo into my onetimergo-sync application.

Few Notes on Local Golang Environment Configuration

Have Ubuntu 14.04 installed on the VM I use as a programming/testing environment.

Golang packages in Ubuntu 14.04 repo are a bit old:

dpkg -l | grep golang
ii  golang                                 2:1.3.3-1ubuntu4~ubuntu14.04.1   all          Go programming language compiler - metapackage
ii  golang-doc                             2:1.3.3-1ubuntu4~ubuntu14.04.1   all          Go programming language compiler - documentation
ii  golang-go                              2:1.3.3-1ubuntu4~ubuntu14.04.1   amd64        Go programming language comp

Static Site on Google Cloud Storage: Caching

Be aware Google Cloud storage sets Cache-Control:public, max-age=3600 header for all files by default. This means files are going to be cached by browsers and proxies so it is going to take up to an hour for folks on the Internet to see an update.

I’ve decided to decrease default max-age value to 600. So I upload blog files with -h option set now:

gsutil -h "Cache-Control:public, max-age=600" rsync -d -r . gs://<bucket_name>/

0xDEAD Unicornz Ascending to a Cloud

What time is it? Migration time! Long story short I’ve decided to play a bit with Google Cloud services and Go. I’m really impressed with the platform so far – it’s awesomely documented and super easy to use. I was impressed to the point I’ve decided to move my blog from a VPS to Google Cloud Storage just to see how it goes.

Here is a step by step instruction

Git Author != Committer

It may be quite confusing, but in git ‘commit author’ and ‘committer’ are separate beasts.

Let’s imagine you have a remote Gerrit repo and you noticed your last commit has author’s email configured as foo@internal.com:

Don’t Rely on Ubuntu 14.04 Service Autocomplition

It appears lot of my colleagues think they’ll get the name of any service in Ubuntu system autocompleted by typing service first_few_letters_of_service_name and pressing Tab button. When this does not work (and it does not work a lot) it creates a lot of confusion and rises lot of questions.

In Ubuntu 14.04, the script that handles completions for service command is /usr/share/bash-completion/bash_completion It looks for service names as files in /etc/rc.d/init.d, /etc/init.d, and in the output of systemctl list-units --full --all

DNS Zone Updater Script

Howdy guys and girls? Unicorn Rider is back and he has something for you.

In most cases Internet providers assign dynamic IPs to customers. It creates problems when you need to access some service in your local network since you don’t know which IP you should connect to.