Home

EC2 Azure GCP reserved VM price comparison

I was looking for a small virtual machine (or VPS virtual private server) for development. Normally I would go with either digitalocean or linode. Their prices are the same: $10 per month for 2GB vm and $20 for 4GB. Because I know I will be using this VM for more than a year, I started look into the VM’s that offered by big 3 cloud providers ...

Read more

Install Taskwarrior server and client on Ubuntu

On Ubuntu >16.04, installing Taskwarrior client is simply: sudo apt install task But you need a taskwarrior server to sync from clients. Follow these steps to set up a Taskwarrior server. install dependencies: sudo apt install cmake uuid-dev libgmp-dev libreadline-dev clone, compile, install taskwarrior: git c...

Read more

Migrate Gitlab to New Server

I recently migrated my Gitlab to a new server, here are the steps and gotchas that I took notes for future references. The source and target server need to run the same version of Gitlab. back-up restore change /etc/gitlab/gitlab.rb, change 8080, to 8082 change

Read more

apeflac2mp3

apeflac2mp3 is a Python script I wrote to bulk convert APE, FLAC or other music files to mp3. I have a lot of musics in APE and FLAC formats, for example this gem: Mozart Complete Works [Brilliant] 170 CDs. It has 170 FLAC files, one for each CD. Each FLAC file also have a cue file that tells title and start time for every tracks in the FLAC f...

Read more

Installing Streisand on Linode

Streisand is a set of Ansible playbooks that set up a VPN automatically. It can create a new virtual machine on one of the cloud providers, such as Linode, from a remote server. Since I already have a spare Linode, I decided to set up Streisand on that server locally. Streisand run only on Ubuntu 16.04, my linode is 16.04 so it’s all good. S...

Read more

How to stream from RaspberryPi PiCamera

Pre-requisites OS: Raspbian >= 8 Do sudo raspi-config and enable PiCamera, in ‘Memory Split’, give GPU more than 128M of memory. Connect PiCamera, reboot. Test PiCamera works by raspistill -o photo.jpg. Load v4l2 module: sudo modprobe bcm2835-v412 Optionally add bcm2835-v412 to /etc/modules file. v4l2 should already present in the OS...

Read more

Using Squid as the internal http proxy

I moved to a new building. In the old building I used to have a few Linux machines and virtual machines connected to internet directly. Now we are on a temporary network, all our machines and VMs are behind a firewall. To connect a machine to internet, I have to open the browser from that machine and load the login page, enter my username and...

Read more

Set up both 32 and 64 bit Anaconda on Windows

I need to have both 32 bit and 64 bit Python on my Windows machine. For 32 bit, I only need Python 2. First, I installed Anaconda 4.3 into my home directory (C:\Users\wensheng). Then I downloaded Miniconda Python 2.7 32-bit installer. I run the installer as usual, but at the last step, where it ask if you want to add path to environment, unc...

Read more