Category Archives: *nix

Problems with RecordMyDesktop and a Command Line Alternative

I have been trying to create screencasts using RecordMyDesktop on Ubuntu. While the app itself functioned well I had a serious problem with the image quality: switching windows seemed to lead to massive diagonal pixelation of the captured images rendering the screencast useless. I played around for a while with various RecordMyDesktop settings (frame rate, […]

Also posted in Command Line | 1 Response

hg-git and pushing to git from mercurial

Documenting my experience pushing mercurial repos to git (and github specifically). Install hg-git Follow Install dulwich >= 0.6. On ubuntu: sudo apt-get install python-dulwich Get the latest version of hg-git: hg clone Add it to your extensions [extensions] git = path/to/hg-git/hggit Push an existing mercurial repo Assuming you’ve got a git repo somewhere, […]

Also posted in Code, Software | Leave a comment

Set Trackpad Sensitivity for Thinkpad on Ubuntu

On a Lenovo Thinkpad the trackpad is the red button that acts as a mouse. To set the sensistivity and speed of your trackpad on for ubuntu/debian linux do (as root): echo -n 180 > /sys/devices/platform/i8042/serio1/speed echo -n 250 > /sys/devices/platform/i8042/serio1/sensitivity To have these applied every time you user the computer (probably what you want!) […]

Also posted in Hacks | 1 Response

Lenovo X61s Battery Life

I have a 2y old Lenovo X61s running ubuntu jaunty. Ever since I acquired I’ve been rather unimpressed by battery life-time which seems to be max 1.25-1.5h (2h if I’ve just got it on but not doing anything). This lifetime is achieved when: Switching off wifi, bluetooth, usb etc Switching laptop mode on Turning down […]

Also posted in Hardware | Leave a comment

Howto Install 4store

My experiences (with the assistance of Will Waites) of installing 4store On Ubuntu Jaunty. No packaged versions of code (there is one in fact from Yves Raimond from mid 2009 but now out of date …), so need to get from github. Recommend using will waites fork which adds useful features like: multiple connections triple […]

Also posted in Books, Python, RDF, Software | Leave a comment

Imagemagick convert notes

Helping myself remember how to do common things using imagemagick’s (excellent but many-optioned) convert utility. convert -scale 10% {in} {out} # convert to black and white convert -type Grayscale {in} {out} convert -monochrome {in} {out} # invert colours convert -negate in out convert -rotate {in} {out} # make the given colour (e.g. here white) transparent […]

Also posted in Software | Leave a comment

External Monitors with Ubuntu and Intel GMA X3100 integrated graphics

I recently took delivery of a Novatech X40r system (Novatech are one of the few suppliers who allow me to get a machine without Windows). The most recent version of Ubuntu (Gutsy) installed without any issues — though I couldn’t quite seem to get the display resolution to match the screen resolution. Next step was […]

Also posted in Hacks | 2 Responses

Counting Words in a Latex File

Much of this was inspired by this blog post. Having tested on my own set of files I would suggest that these methods could be ranked in order of accuracy as: untex + wc wc pdf file wc $ wc -w file.tex This is very simple but is pretty inaccurate since wc has no […]

Also posted in Command Line, Hacks | 1 Response

csv2ascii: display csv as ascii tables

Having looked around for a while without success for something that would spit out csv files as ascii tables I decided to hack something together. The result is a small python script It is currently fairly crude, for example it just truncates cell text which is too long, but I hope I’ll have some […]

Also posted in Command Line, Hacks, Python, Software | Leave a comment

Find and Replace Across Multiple Files

Archiving for my own benefit the results of yet another 5 minute look for how to do find and replace across multiple files from the command line: Use sed: sed -i ‘s/foo/foo_bar/g’ *.html use the old perl hack: perl -w -pi~ -e ‘s/foo/bar/’ [files] Notes: -p: loop, -i edit files in place (backup with extension […]

Also posted in Command Line, Hacks | Leave a comment