Open Source

The Times They Are a-Changin

1 min read

Recent Posts:

Search for a text string within files

At times you see that a particular image or so is not found when loading a web page and you are at a loss where the call came from. At least I had that today when I noticed that a menu image was called. The command to search for that is actually really straight forward: grep -rnw 'directory' -e 


Read more →

Minify files

I use yui-compressor to minify my files. It’s so easy. In Ubuntu (15.04) it’s available via apt-get. To install it (on Ubuntu) type the following in your terminal window apt-get install yui-compressor The command structure to run it is yui-compressor SOURCE > TARGET e.g. yui-compressor 


Read more →

Reduce the size of a pdf

A somewhat weird but simple way to reduce a pdf is to concert it to a ps and back e.g. pdf2ps input.pdf output.ps && ps2pdf output.ps output.pdf

Read more →

Prepend and append example of a redirect file using awk and sed

I needed to generate a .htaccess redirect file where each line has a simple command redirect 301 old-file new-file The file called crawl-error.txt with all the required urls that needed a redirect was quite long so I did the following in no time. First ensure that the file is really a proper text 


Read more →

Two git repositories on the same server for a single user

I discovered that it is not possible, at least not for the same user, to have two git projects in the same account as github uses the ssh key to identify your repository. Once I realized that this was the problem, the quick fix was to clone the repository in another account. I created a new user and 


Read more →