Skip to main content

Android

Wow I never thought this day would come! Posting to the internet from a phone. My first phone was a nice brick as was typical at the time. I only turned it on to ring in emergencies, and probably never sent a text with it. After I started going out with my first girlfriend, I felt the need to get a slightly fancier phone, a Nokia 3210. A true classic, mostly due to the game snake which was all the rage at my school.

Tunneling to a remote machine via ssh

Update: For the most part, I want to tunnel from the server to the local machine. This only works with the localhostname set to localhost, for example to tunnel a mysql server to the current machine port 10101: ssh -L 10101:localhost:3306 user@remoteserver.com -N The localhost is important, and in this case the mysql client (on the local machine) has to have the hostname set to 127.0.0.1 (for some reason localhost doesnt work).

Graphics engines

I’ve been looking into graphics engines recently, though this can only be a part time hobby for me since I should be doing my PhD work. I’ve mostly been looking at two in particular: Ogre Irrlicht Both of these seem to have some pros and cons, which I will be detailing in a second. I cannot decide which one I prefer though so maybe you can help me out?

Tumblr

Just joined tumblr to see what the fuss is about, mostly because of Notchs blog. Am getting bored of Wordpress as its interface is a little clunky (though powerful) so im giving this a go! Lets see how this goes! Edit: Sat 16 Feb 2013 17:53:46 GMT - this is obviously not the case at the moment, now I’m statically hosting this blog

Adding module imports to iPython startup

I’m constantly opening an iPython interpreter and having to import my common modules (for me pyfits mostly). The easiest way to import modules on iPython startup is to look in your ~/.ipython/ipy_user_conf.py file which is a nice easy way to add python code into your ipython startup (as opposed to the ipythonrc file which is about colours etc.). In the main function, just add a line such as ip.ex("import pyfits") This will allow custom code to be run at startup.

Flash blocker for safari

Update: Wed 27 Feb 2013, since I’m updating this blog, chrome and firefox and safari all support this feature. Google Chrome has1 one, Firefox has one but Safari does not… until now! For me, having a manual “load flash only when I tell you to” button in a web browser is a must. This reduces CPU usage on my mac which increases battery life and stops it getting too hot. These are nice things to have!

Synergy

I have recently been playing with the Synergy software, which allows a single mouse and keyboard to control multiple computers whatever operating system they may be using. I am currently using my PC’s mouse and keyboard to write this on my macbook pro! It’s pretty easy to set up, the windows server is pretty simple, the only bit the documentation does not emphasise enough is that the screens must be named after the hostname of the computer, so for widows it’s the ‘Computer name’ and for OSX/linux it’s the output of the ‘hostname’ command.

Linking on linux

I’ve just found out what some strange linking options mean with gcc! Quite often i’ve seen at the linking stage gcc object.o -o executable.out -lsomelibrary -Wl,-rpath,somepath I’ve discovered that the -Wl,-rpath,somepath expands basically to -Wl -rpath=somepath and this means the location of the shared library in somepath is hard coded into the executable to be used at runtime. rpath means runtime path, all of which means the dangerous LD_LIBRARY_PATH environment variable is not needed.