Solve zsh cursor positioned at the beginning in zsh history lookup using arrow key for Ubuntu

Zsh under Ubuntu has a strange behaviour. When you have typed some commands and use up arrow key to look back, the cursor is always at the beginning of the line. This can be solved very easily.
Continue reading “Solve zsh cursor positioned at the beginning in zsh history lookup using arrow key for Ubuntu”

Enable Memcached on Remi based PHP install for WordPress

The php stack I am using for blogs and other hosted php websites is from Remi. I am on PHP version 5.6. The memcached plugin was enabled and I never checked its status. I only found out that the memcached is not enabled at all on my websites.

OK I figured this will be a simple task. It is. There are a few things that you need to be cautious about if you are using Remi as php base. The modules will not be loaded magically.
Continue reading “Enable Memcached on Remi based PHP install for WordPress”

Install missing LaTeX styles and definitions

When I was compiling my \LaTeX report, some files are missing:

! Package fontenc Error: Encoding file `eu1enc.def' not found.

An interesting installation of \TeX relatex packages is, you can install the missing files by providing this command:
Continue reading “Install missing LaTeX styles and definitions”

Modify GitLab Branding

If you want to remove the branding, you could try to edit the following yaml/rb file, but you need to be cautious about the space as yaml is very sensitive to spacing (no tabs allowed). Also, when you do an upgrade on GitLab, those changes will be lost. Be sure to back up the files before you change anything.
Continue reading “Modify GitLab Branding”

Proxy all traffic of a program with ProxyChains

EastLink sucks. Somehow in the evenings, they manage to lower the speed of my connection from home to my server at OVH Canada BHS centre. I’ve complained before but this issue is not going to be resolve anytime soon. Since my residence does not support another ISP (BellAliant, namely), I have to stick to EastLink for now. Strangely EastLink connects to other places relatively well, even my server at the west coast in the states. My other server could connect to BHS server in full speed.

So, how do I bypass the speed limit? By installing ShadowSocks at both ends (home and west coast), I could proxy all my web traffic in Firefox or Chrome without problems. What about SSH, SCP or even rsync? After consulting their man pages, I found some programs support http proxy settings (rsync). Some support port binding (ssh). scp support ProxyCommand, which is overly complicated. None of the above features suit my need.

Continue reading “Proxy all traffic of a program with ProxyChains”

Check Out your IP address (And User-Agent)

I know there are many tell-your-IP-address services available, some even have the whois lookup functionality. I found it was unhelpful when it comes to scripting. I made a website, it has more features which curlmyip.com doesn’t have. It could report your IP address for a script-friendly way (direct response). It supports ipv4, ipv6 and SSL access.
Continue reading “Check Out your IP address (And User-Agent)”