Stairways to Heaven

October 25th, 2008

Recently I have been feeling extremely unsatisfied with every song in the history of music. No song could express the deep pits of emotion that my tradis heart contains. Every human attempt to express the crushing frivolity and inconsequential importance of living sounded so trivial, shallow, and pointless. All except one song, that is. One song alone captures all the pain, hate, and rapture that we poor creeping things on this rock are capable of feeling.

That song is Stairway to Heaven. I have sworn to listen to no other song ever again and will be actively working to destroy every other piece of music because now their inferiority is now just a distraction to the perfection of all human spirits. But, you may wonder, wont we get bored listening to the same song again and again? No is the answer. However, to ease the transition to the perfect world I have a modest proposal to replace all the defunct songs in every genre of music with a single version of Stairway.

Behold your new record collection. All the music you will ever need. Its a good thing you bought a 80GB ipod, you will need it to store FLAC recordings of Stairway covers!

First let us summarise classical music, although a noble movement to describe emotions, the Sydney Philharmonia Choir has ended that endeavour. Opera too is no longer necessary. Alas I think we need a second take on “Gregorian” chant, despite the choreographed walking this is is really really awful, only the masterful lyrics save this tasteless performance.

We all like to put on the ritz from time to time and swing like it was 1929, have no fear, in our new world we can still do just that.

Now I know that some of still feel some legacy attachment to outdated bands such as The Beatles or The Doors who unfortunately both disbanded before they could safeguard their relevance. Fortunately, two Australian cover bands have preserved their memory for us.

Yes, no matter if you want to chill with a doob and some reggae, or jump around to some R&B, Stairway is there for you. But we all like some light hearted B52 style pop from time to time. Some even find bemusement in the spoken word stylings of William Shatner’s (until the Man Himself records it, we shall settle for second best).

Most of these songs are from the ultimate record, the pioneers of our shared vision of the perfect world of music.

Pictures of an egg leaving an ovary

June 12th, 2008

http://www.newscientist.com/channel/being-human/mg19826604.200-human-egg-makes-accidental-debut-on-camera.html

Resilience or Why there are so many of us.

June 1st, 2008

He did not fear the cold, he simply slipped outside, pulled down his seal skin trousers and defecated into his hands. As the feces began to freeze he shaped it in the form of a blade, he put a spray of saliva on the edge of the shit knife. When it finally froze solid he butchered a dog and skinned it and improvised a harness, took the ribcage and improvised a sledge with it, harnessed up an adjacent dog and disappeared over the ice flows, shit knife in belt.

From the indispensable TED Talks.

From Wade Davis: Cultures at the far edge of the world
http://www.ted.com/index.php/talks/view/id/69

Exporting sections of a LaTeX document to EPS or PDF

September 13th, 2007

Sometimes when submitting a paper to a journal or conference they cannot compile your LaTeX correctly. Perhaps you are using PSTricks or TikZ to make diagrams, or maybe your table just wont fit across a page. You are requested to resubmit with the offending code replaced with an image.

A few tries with screen shots or other rasterisations will quickly turn you off that idea.

A much nicer hack is to use preview-latex. preivew-latex is the package behind the WYSIWYG editing of LyX and KTikZ. It compiles the LaTeX you specify to a DVI with special bounding box info which dvips uses to make an eps.
The Ubuntu and Debian package is called preview-latex-style.

With a table or TikZ image in mind, here is a brief example.
Make a new tex file, picture.tex and put in the following code.

\documentclass{article} %or llncs or what ever
\usepackage[active,tightpage]{preview} %active turns the package on, tightpage makes the bounding box
%%%%
%%%% however many \usepackage and \newcommand you want.
%%%% \begin{document}
%%
%%some latex code that will not end up in the output EPS.
%%
\begin{preview}
% here goes the bit of latex they
% are having trouble with
\end{preview}
\begin{preview}
%% you can even put multiple pictures in one file. latex
%% will put them in different DVI's.
\end{preview}
\end{document}

Save the file and run
latex picture.tex
dvips picture.dvi
#and if you want a pdf
epstopdf picture.ps

Then back in your document insert the image using \includegraphics{picture} (you need \usepackage{graphicx})

Reference Managers

March 5th, 2007

For the past 2 years I have been storing my BibTeX references in JabRef. It’s nearly perfect for my needs. The features I use and like the most are

  • native database format is BibTeX, (what you edit is BibTeX).
  • tags and searching across all text in an entry (abstracts etc).
  • converters for changing between different citing formats.
  • a store of journal short names so you can easily convert from short to long form and back again.
  • links to local pdf files, give it a directory and it will automatically link the file to BibTeX key.
  • customised auto BibTeX key generation.
  • links to articles citeseer page.

Its only flaw as far as I am concerned is that it is written using Java Swing (yuk) and that the GUI is a bit too cluttered and messy.

When I saw Aidans post about Referencer i was intrigued by the GNOMEy interface. It’s really usable but it’s a bit restrictive in editing the BibTeX fields. For example, I like to keep article abstracts and comments in the BibTeX entry so the I can search more accurately for key terms. Referencer doesn’t make it easy (they appear as one long line in the “Extra Keys” list) since it’s not a common practice. JabRef allows this and even if there was something else I wanted to store in the BibTex that JabRef doesn’t cater for, I could edit the raw BibTeX and it will remain untouched by JabRef.

Referencer also stores your database in an XML format which makes me a bit uneasy. This causes a bug for letters with accents over them. For example, say I have an author called “Niño” in my database, it is converted from the BibTeX “Ni{\~n}o” and stored in XML as “Ni\~no”. When this is exported back to BibTeX it remains as “Ni\~no” which LaTeX wont compile.

I normally prefer GNOME/gtk+ applications over KDE/QT applications because I find the GNOME way of laying out GUIs much more pleasant and intuitive. Just giving what the average user needs in a clear uncluttered way.
Unfortunately I want to do some things differently Referencer. However nice the interface is, think I will be sticking with the cluttered swing interface of JabRef for now.

Renaming files with spaces in bash

November 21st, 2006

Need to rename lots of files with whitespace in them?
In bash and zsh you can do the following

#rename a load of *.mp3 files to some other extension.
#for every file in the current directory
for file in *;
do
#remove the extension by cutting every thing past the '.'
fileName=`echo "$file" | cut -f1 -d'.'`
#rename the file mv "$fileName".mp3 "$fileName".k
done

Normally for loops in bash treat whitespace as the delimiter in text so you will end up with some thing like

$ for file in `ls`; do echo $file; done
07
-
Whats
love
got
to
do
with
it.mp3

Using for file in *; avoids getting the string output of ls which will just list all the filenames with spaces between them and allows bash (or zsh) to do what you meant it to do.

Remember to keep the variable in double quotes (”$file”) when using it as it keeps the white spaces escaped.

Gnome scripts

May 29th, 2006

Nautilus can be easily scripted to speed up common tasks such as opening a command prompt or performing operations on files.
Any scripting language can be used but bash, perl and python are most common.
The scripts appear in a “Scripts” sub menu when you right click in Nautilus.
The current file selected and a few others are environmental variables for use in the script.

As a simple download and install try the “why is this not there by default” command prompt here script.
There are a few available to choose from, download one and save it to your /.gnome2/nautilus-scripts directory.
The name of the file is the name it will have in the GUI.
Most scripts on this site have_names_with_underscore_spaces which is not necessary (at least in gnome 2.12) so rename it and put some spaces in.

Now right click on your desktop and in the pop up menu you should see the “scripts” option has appeared.
Go into it and select “Command Prompt” or what ever you named the file.

wow. I’m sure Havoc and friends have a document to explain why that’s not there by default but moving on we can now make our own 8 line script.

I hate postscript files. I had a traumatic experience as an undergrad with some notes in badly made postscript files and ever since I deal only with PDFs.
Unfortunately, I download a lot of PS files and so instead of opening a terminal and typing ps2pdf blah.ps all the time I can now right click on a file and select “Scripts->PS to PDF” and the hated format is gone.

Here is the simple script I made (modified another script from Gscripts site).

#!/bin/bash
for file in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
do
if [ -f “$file” ]; then
base=${file%.*}
cd `dirname “$file”`
ps2pdf14 ${file} ${base}.pdf
fi
done

You can also categorise your scripts in folders if you want.

הא שני

November 7th, 2005
תודה לי כול מי עשיתנ הערה
מעתה יש לי המילון אוקספןרד. סכנה מאןד !!
שבוע שעבר, שני ואני יהלנו בסירא. הסירא רצה לדאלכי ואנחנו ראינו ארי-ים ואמי ראיהי דולפין. שני לא ראהה הוא.
פו לינך להסירא.

שלום עולם

October 21st, 2005
‏אני רוצח ללומדללמוד ענרית. כחאז אני סוגרכותב בעברית פופה. יםאם אני סוגרכותנ עברית רהרעה עבדתגידו לאנילי בבקשה.