USING IWATCH TO AUTOMATICALLY RUN UNIT TESTS (LINUX)

iWatch is a perl script that uses inotify to monitor files directories. It’s similar to the watch tool, which can do all sorts of stuff if the files or directories it’s watching are modified or affected in pretty much any way at all. Install iWatch apt-get install iwatch I’ve got this 1 liner in a file to quickly watch my directory and execute a PHP unit test . #!/bin/bash iwatch...

HOW TO SET UP A LOCAL APT CACHE FOR UBUNTU

Setting up a local cache is a smart idea if you’re going to be running a VM server, whether it be KVM, VirtualBox, or any other option really. I assume the same instructions will work with Debian, but I haven’t tried. First up - install apt-cacher-ng. apt-get install apt-cacher-ng Add this to the bottom of your /etc/services: apt-cacher 3142/tcp apt-cacher 3142/udp Edit...

AWESOME CHROME EXTENSION TO BLOCK WEBSITES FROM GOOGLE SEARCH RESULTS

I wrote a post a few years ago that made the digg and reddit homepage saying Experts Exchange should be removed from Google’s search results because they were using a technique called cloaking - hiding their content behind registration and showing a different version of their pages to the Google crawler. Google just released a Chrome extension to blacklist sites from your search results....

SETTING UP A DHCP BRIDGE IN UBUNTU 10.10 FOR VIRTUALIZATION

Setting up a network bridge allows you to give a virtual machine it’s own IP address and make it accessible from the outside. A DHCP bridge is useful in a smaller network where static IPs aren’t assigned - like in a home or small office. You’ll want to do this if you’re setting up LXC or KVM. This is what my /etc/network/interfaces config looks like. `` auto lo iface lo...

VIRTUALBOX 4 - NAT PORT FORWARDING GUI

Version 4.0 of VirtualBox will have NAT port forwarding available in an easy to use GUI. The more fervent readers of this blog will remember this post which I described how to set this up on the command line. Open your VirtualBox networking settings, and click the port forwarding button. Click the little plus on the right to add your settings. You can leave out the IP - it’s optional.

ERLANG CODE AUTO RELOADER - AUTO RUN UNIT TESTS AND HOT LOAD CODE AFTER A BUILD

I wrote this post a few months ago when I was developing a new Erlang application. I eventually ended up using the reloader I mentioned at the end, but never documented it. Now I’m about to start writing a new app, and I’m on a different machine. First, get the reloader. It was developed as part of mochiweb but functions just fine on it’s own. Just put it somewhere accessible - I...

READYNAS RSYNC TUTORIAL

The NETGEAR ReadyNAS is a pretty sweet product if you’ve got a small team like I do. It’s inexpensive and easy to set up. Log into the ReadyNAS and turn on Rsync for your backup share. Optionally, set a username and password. Your ReadyNAS will start up it’s rsync daemon. Replace the password and IP below with the rsync password and IP of your NAS, and use the share name in the...

SETTING UP NAT PORT FORWARDING WITH VIRTUALBOX

I’ve typically used bridged networking with VirtualBox, but you can run into some issues. If you’re somewhere without internet access, or if you’re changing IPs often, you might be better off using NAT settings. There’s a few other advantages - for instance you won’t need to check the IP of your machine in order to connect to it over SSH. It’ll just work....

CUSTOMIZE TAGLIST PLUGIN DISPLAY

I’ve hopped back on the VIM train recently, and I’m loving it. Command-T, NERDTree, buffer explorer and fixing my fonts in MacVIM ( set guifont=Inconsolata:h16 ) have all been essential to the move. That and the INSANELY helpful folks in #vim on freenode. I just read the VIM book cover to cover. Extremely useful. I recommend it. The latest thing I figured out I wanted was to make...

SETTING UP DEFAULT CRON PATH

I’ve run into a ton of issues working with crons, mostly with the $PATH variable screwing things up. Scripts work when run manually on the command line, but fail when run in cron. Very annoying. I’ve asked a bunch of Linux sys admins how to fix this - and the answer is always “put the full path in your scripts” which to me in unacceptable as it introduces the possibility of...