Techie Toolbox Part 2

It’s the start of the new semester and everyone’s busy with lectures, seminars and tons of coursework – working efficiently is key (not only) at this time of the year! Here are some tricks from my Techie Toolbox which might help you getting things done a little faster.

Screen

I usually run most of my experiments on another computer here in my office rather than on my own laptop, as they often take several days to run (so. much. data!). Using ssh to remotely login to the machine is obviously the best option to access the process and data when I’m not sat right in front of it. There’s just one problem: you can’t terminate the connection, as the code just stops running as well. The solution comes in the form of a neat little command line tool called ‘screen’, which allows you to resume a session even after disconnecting and reconnecting to your server. Sweet!

There is a lot of information on the web about screen, so I’ll just link to the official GNU Screen manual and a short and nice tutorial.

One problem I encountered which I didn’t know how to solve straight away was resuming a screen that wasn’t detached properly. If your ssh session accidentally ends (i.e. if the connection dies) your screen session will not be detached. This means that you can’t resume it with the usual screen -r. One option to resume it is with screen -x, but you won’t be able to detach it that way. The solution is to detach the running session first using screen -d, then resume it as usual with screen -r. Simple!

Latex word count

If you’ve been reading my blog, you probably know how much I love LaTeX. I can’t imagine ever writing anything technical in Word (or Pages on my Mac…) ever again. While the LaTeX editor I’m using (Texmaker) has plenty of helpful features (1-click-compile & preview!), there’s no way to get the word count for the whole document, which is particularly bad when you spread out your text over several files. This LaTeX word count tool is a simple perl script that allows you to specify exactly what you want to be counted – included files, headings, formulas, captions, the bibliography, etc. Absolutely essential tool for your coursework and essays!

Search bar short cuts in Chrome

One of my favourite little tricks is using short cuts for customised searches in my web browser. I often use a German-English dictionary to look up stuff, check Wikipedia for some quick facts, or search for words in an online Thesaurus. While some browsers have an additional search box next to the address bar, I quite prefer Chrome’s ‘all in one’ address/search bar (called the ‘omnibox’).

The default search for the omnibox in Chrome is, obviously, google.com, but you can add additional searches for any web page that has a search box. You can either add a new search engine in the browser preferences (Basics tab > Search > Manage Search Engines button), or right click on any search box and choose ‘Add As Search Engine’ from the context menu.

Change the ‘Keyword’ field to a 1-character identifier for the search engine – for example, I have ‘d’ as dictionary, ‘t’ as thesaurus, ‘e’ for Ebay, etc. The search queries in your address bar will then simply look like this: ‘d haberdashery’ to look up a word on my dictionary page, ‘e macbook pro’ to search for ‘macbook pro’ on Ebay, etc.

This tiny little addition to my browser massively increases the speed of looking up things and I use it all the time. Highly recommended!

[Photo by Tomusic (Tom Wolfskämpf) [CC-BY-SA-3.0 or GFDL], via Wikimedia Commons]