Skip to content

birkhoff.me

Gitlab CE Behind Traefik

At my university’s CS department, we are trying to set up an internal GitLab CE instance for CI/CD of our projects. Based on our infrastructure, I decided to manage a Traefik instance and deploy GitLab Omnibus on Docker. Nginx # To have Traefik reverse-proxy the nginx instance, simply disable HTTPS and route the traffic to container port 80: nginx['listen_port'] = 80 nginx['listen_https'] = false nginx['real_ip_trusted_addresses'] = [ '172.19.0.2/32' ] # Traefik's internal addresss nginx['real_ip_header'] = 'X-Real-Ip' # X-Real-Ip is set by Traefik nginx['real_ip_recursive'] = 'on' container labels:

Read more »

The evolution of my solution to blogging

I have been writing blog posts (mostly technical ones) since elementry school, probably from eight years ago. At that time, I had only little knowledge of web. I started with WordPress, mostly because I was more comfortable with PHP since that it was the very first programming language I’ve started with. I hosted that WordPress site on GoDaddy. At some time, GoDaddy raised a payment issue on my account, and I was not able to renew it because credit card issues (I wasn’t even 15, so billing was always a big issue to me).

Read more »

Ghost blog on Google Kubernetes Engine and B2 Cloud Storage

I’ve recently been migrating my infrastructures to GCP and one of the most critical services I’ve been running is Ghost. Previously, I ran Ghost with: a tiny cloud VPS Docker Compose, which runs a MariaDB instance as well a local volume to /var/lib/ghost/content a custom theme that I upload manually every time I made a change Obviously this is one of the worst setup I could’ve had. Non-scalable, not fault-tolerant, and troublesome just to customise the theme files.

Read more »

Cloudflare Railgun on CentOS 8

There’s no official documentation yet on installing Railgun daemon on CentOS 8, however you can do that with the following commands: $ curl -svO http://pkg.cloudflare.com/pool/el7/main/r/railgun-stable-5.3.3-1.el7.src.rpm/railgun-stable-5.3.3-1.el7.x86_64.rpm $ sudo yum install -y memcached $ sudo rpm -Uvh railgun-stable-5.3.3-1.el7.x86_64.rpm Then configure Railgun with your credentials.

Read more »

Shrinking Ubuntu 20.04 VM .vdi on macOS VirtualBox

First of all download SystemRescueCd, which we will use later to manipulate our virtual disk. Mount it to VM with VirtualBox GUI. Upon launching the VM it should automatically boot to SystemRescueCd. Choose the default option to go to the recovery system. Next run fdisk -l to see the disk partitions. To me it’s /dev/sda5. Then run zerofree -v /dev/sda5 to start filling the empty space with zerofree. It should not take too much time, 1 or 2 minutes should do it.

Read more »

My first try to the IELTS test, and my thoughts on it

So I went to a IELTS test location near Taipei Main Station today for listening, reading, writing and speaking tests. I scored L7.5/R8/W6.5/S6, total 7. Here’s what I’ve learned from it. I’ve been using English for over 10 years, and I didn’t listen to English classes at school – I’m mostly self-taught. I’ve been writing English blogs for 4 years, just in this website. Unfortunately I don’t get much chance to speak English here in Taiwan, so my speaking skills is pretty bad, I would say.

Read more »

Optimising my zsh

So recently I noticed the initialisation lag when starting a new zsh session. I decided to fix it and here’s what I’ve learnt. First of all, credits to this article, which provides a handy way to profile zsh startup stage. Follow the guide in there to profile first, and read on. How to profile your zsh startup time My tips # See what parts of the initalisation stage takes so much time from the above profile results.

Read more »

My experience applying for QAE Internship at Umbo CV Taipei

I went back to Taiwan to finish my high school on June 2020. At the same time, I was looking for internship opportunities in Taipei. Fortunately I came across the backend engineering internship vacancy on Umbo’s website. I managed to make a simple resume and a cover letter in a week or two, which I sent to Umbo later. Six hours letter I got an email from the human resources department at Umbo saying that the backend internship is no longer available and asked me if I’m interested in a QAE internship.

Read more »

Watching Disney+ in Asia on Android TV via Clash on the gateway

I’ve been watching Marvel movies recently on Disney+. I also have got a 4K UHD HDR monitor and a MiBox at home, which is exactly capable of handling 4K HDR content! So I thought why not give it a try to play Disney+ content on that box since Disney+ has got a native Android TV app. The issue is that as of now Disney+ only serves Western customers, and I need to do some tricks in order to play content in Taiwan.

Read more »

Switch Linux kernel on OVH Dedicated Server with Soft RAID

OVH ships their dedicated servers with their terrible custom Linux kernels. I had to switch it for some functionality of our production site to run properly. Here is how. First of all, grab a kernel using yum, and check it’s boot entry name. $ yum install kernel $ grub2-mkconfig -o /boot/grub2/grub.cfg $ awk -F\' '/menuentry / {print $2}' /boot/grub2/grub.cfg Here I had CentOS Linux (4.4.222-1.el7.elrepo.x86_64) 7 (Core) installed. Now we need to make it our default boot OS.

Read more »