Installing uglyfi-js and node on Ubuntu 12.10

The e-Classifieds ® Corporate edition uses lots of JavaScript code, so to help speed things up we compress the code. Previously this has been done using JavaScript::Minifier::XS from CPAN, but all the cool kids are using UglifyJS. So I thought I would see how it compared.

Read more of this post

Advertisements

Ubuntu resets /etc/hosts [SOLVED]

Due to a hardware problem on the computers at home I had to assemble an Ubuntu box from an old box. (actually Kubuntu because I just find KDE easier to work with). I had a minor issue that the drive had died, but thanks to a USB stick and a DVD I was able to get Kubuntu installed pretty quickly.

I did learn that while 12.10 is nicer than 12.04, 13.04 daily is far from ready for daily use. Things just wouldn’t install properly, but fortunately re-installing from 13.04 to 12.10 was fast.

I dislike advertisments and being tracked so I use the MVPS hosts file. It is super easy to install:

wget -O - http://winhelp2002.mvps.org/hosts.txt | sudo cat - >> /etc/hosts

However I found that everytime I rebooted my ubuntu box it reset the hosts file.

After some Googling it was variously reported that this could be an error, but also related to the fact that when using DHCP, the client updates /etc/hosts with entries for 127.0.0.1. The solution therefore is to use:

127.1.1.1

Which you can add in-line:

sudo sh -c 'wget -O - http://winhelp2002.mvps.org/hosts.txt | sed 's/^127\.0\.0\./127.1.1./' >> /etc/hosts'

Thanks for everyone that pointed out that it needed to change network.