NS-3 Click integration

Intro Click is a modular router library developed at UCLA, allowing Click-definied router networks to be ‘attached’ to an ns-3- nodes layer 3 functionality. It has very little relevance to my own research, but was interesting to play with. In a nutshell, Click is an extention to the linux kernel that provides a highly performant and configurable routing architecture. Requirements Already installed ns-3 git ~/src directory Get ’er dun cd ~/src; git clone git://read.cs.ucla.edu/git/click ; cd click sudo ./configure --enable-nsclick --enable-userlevel; sudo make; sudo make install ...

April 30, 2012 · Andrew Bolster

K8055 USB + Python + Twitter + IRC: Space Indicator as a OS Service

** After a long time in the oven, Farset Labs is up and running. Unforanately we don’t have any of the crazy equipment yet, since we’re broke. As my first ‘official’ Farset Labs project, I’ve installed a ‘Big Red Button’ to notify the @FarsetLabs twitter feed and #FarsetLabs on Freenode to the status of the space. Basically, first person pushes the BRB down in the morning, then one of the directors key-unlocks the space to ‘close’ it. ...

April 10, 2012 · Andrew Bolster

Python + irclib for IRC Status Updates

IRC, Python, Ubuntu linux. Simples! Same as by Twitter post, but for IRC. Biggest problem with this one was working out that the IRC server needs to be kept alive with the irclib.IRC.process_once() command. This is wrapped in the while loop that assumes that there is other stuff going on for which you are waiting on a condition to be satisfied, but could easily be ignored if one is just sending out one message. Also, the PRIVMSG command can be used to broadcast to a channel, as is used here, or, as the name suggests, to communicate with a specific user. ...

April 10, 2012 · Andrew Bolster

Python + Oauth2 for Twitter Status Updates

Working on the Farset Labs Big Red Button for space occupancy, had to find a simple way to tweet a status. This is a post to remind myself and anyone else who has dived through hundreds of incorrect, out of date, or inapplicable examples of Oauth 2 with Twitter using a pre-generated auth-token pair. import oauth2 as oauth import urllib ckey='$CONSUMER_KEY' csecret='$CONSUMER_SECRET' akey='$AUTH_TOKEN' asecret='$AUTH_SECRET' def post_twitter(status): try: consumer = oauth.Consumer(key=ckey, secret=csecret) token = oauth.Token(key=akey, secret=asecret) client = oauth.Client(consumer, token) resp, content = client.request( postapi, method='POST', body = urllib.urlencode({"status": status, "wrap_links": True}), #headers=http_headers, #force_auth_header=True ) except oauth.Error as err: print("Twitter Error:"+err) return resp, content post_twitter("Hello Twitterverse")

April 10, 2012 · Andrew Bolster

My Guide To My Own Favourite Ubuntu Setup

This is my own self-indulgant reminder for how to do the things I like. I’ll keep adding to this as I think of them. Basic Setup Install Ubuntu Latest (currently 11.10), With the third party libraries and a home partition leaving at least 20GB for ‘/’. Then Update everything, during which time you can plod along to download the relevant packages for Chrome Beta, Dropbox, etc Once the update is done (I’d restart in most cases), additional packages I like to add are; ...

January 5, 2012 · Andrew Bolster

Ringing in the New Year by seeing out the old

2011 has been a great year for me; Graduated with a 1st MEng in Electronics & Software Engineering @QUB, Got Job offer to a major financial house, which I turned down, Got Job offer to a C|EH company in England, which I turned down, Got DELNI Funded PhD offer (x4) from CSIT/ECIT, which I turned down, Got selected to be one of the two UK projects within a Joint UK/FR Defence PhD Programme, which I accepted, ...

December 31, 2011 · Andrew Bolster

Guide to Persistent Reverse SSH Shells and Port Forwards

Idiot proof setup for persistent reverse shells / port forwards (same thing) under a Ubuntu VM remote and my Dreamhost server, but should apply to nearly* all *nix’s First off, some terms to keep this easy. I want to be able to access my in-office VM, xavier from my server magneto (not my names, but they conveniently complement). xavier is not publicly accessible, but magneto is. I’ll be replacing all of the FQN’s with these terms so expand on your own. In generic terms, xavier is the remote machine (i.e the one behind some NAT firewall or such that you want to get access to) and magneto is the local machine. Its a bit confusing since all of the work is done on xavier, but it makes sense in the long run. Just trust me and get on with it. ...

December 8, 2011 · Andrew Bolster

Guide to Expanding Oracle Virtualbox Drives

The Idiot Proof Guide for Windows-host, *-guest setup. (Ubuntu in my case, and should work for any host) Make sure you’re working with a VDI, not a VDMK (if not, File>Virtual Media Manager right-click, Copy) Drop into a command line (on windows, press Win+R, type ‘cmd’) and navigate to the Virtualbox directory (won’t need to do this on *nix) Execute VBoxManage _path_to_your.vdi_ --resize _new_size_in_MB_ Download UBCD and mount it as a DVD to your VM ...

December 8, 2011 · Andrew Bolster

Unicode Characters in Mendeley Bibliography Breaking Latex?

I use Mendeley for my reference and citation management. I use TexClipse for (most) of my $latex \LaTeX$ editing, ViM otherwise. I use Xelatex / pdflatex for project building. These don’t always work so well together. One issue I came across was that Mendeley can insert some weird Unicode whitespace characters that ‘disappear’ in TexClipse / Vim, but break xelatex/pdflatex. Easy solution: set the project encoding in TexClipse to ignore these characters upon pasting. ...

October 26, 2011 · Andrew Bolster

Stuff I've found interesting in the past month - 2011/10/23

Baby trashes bar in Las Palmas

October 23, 2011 · Andrew Bolster