Brief notes on various great open source programs that I use and can’t imagine not using. These are somewhat scratchy as these notes are something of an aide memoire for the author and there is better documentation already on the internet.
The post should more properly be titled ‘great open source software and configuration’ as some of these e.g. solarized, /etc/hosts are not strictly software.
abcde is a single script that very nicely rips CDs, adding metadata and spitting out mp3 or FLAC.
It can be downloaded here: http://code.google.com/p/abcde/downloads/list
There are various dependencies, as one would expect. The only tricky one I found was mkcue, which I sourced from here: http://mkcue.sourcearchive.com/. Mkcue required a compile from source on FreeBSD but I think it is likely to be lying around on a linux distro such as Ubuntu.
Both abcde and cddb-tool need the following edit at the head of the script for use on FreeBSD systems:
To rip a CD to a single FLAC file, I use the following:
abcde -d /dev/cd0 -V -1 -o flac -a default,cue
See http://www.xiph.org/paranoia/faq.html#corr for CD paranoia symbols
If you run OSX you should check out Max.
abcde can also be installed on OSX with
brew (you will also need to install flac via brew) although single file albums in flac do not seem to be possible.
If you don’t want an iTunes style music library programme, DeaDBeeF is a very good player which does what it does well, rather than trying to do everything. It plays a variety of formats such as mp3, FLAC, ogg etc, and has a nice EQ and interface.
It modestly markets itself as the ‘Ultimate Music Player For GNU/Linux’, but it works very well on FreeBSD also.
/etc/hosts can be used to override DNS look-ups and one elegant applicaton for this is to redirect http requests to unwanted domains to localhost.
/etc/hosts file with a comprehensive blacklist of tracking, ad etc sites can be found here http://someonewhocares.org/hosts/
The text version can be found here: http://someonewhocares.org/hosts/hosts
To append to your own
# Backup old hosts file [mike@leia ~]$ sudo cp /etc/hosts /etc/hosts-old # Download and append as root root@leia:/home/mike # su root@leia:/home/mike # curl 'http://someonewhocares.org/hosts/hosts' >> /etc/hosts root@leia:/home/mike # exit
latex / pandoc
Latex is a veritable and very good typesetting language.
If you install latex from the package manager in FreeBSD you get tetex, which is out of date.
Use Tex Live instead: http://www.tug.org/texlive/acquire-netinstall.html
Because latex spits out very nicely formatted documents but is overkill for some tasks which do not require fine-grained control over the output, the excellent pandoc can be used with popular markup languages such as markdown.
With pandoc, spitting out markdown as a nice formatted PDF is as simple as:
pandoc file.markdown -o file.pdf
Pandoc’s markdown syntax is nicely explained in
You can also use pandoc to produce slides, as explained in http://pandoc.org/demo/example9/producing-slide-shows-with-pandoc.html, including using the very nice reveal.js framework.
One very nice feature of using pandoc is that it accepts Latex maths notatio within markdown files, between the usual dollar sign delimiters. A good reference to latex maths notation can be found here http://en.wikibooks.org/wiki/LaTeX/Mathematics#List_of_Mathematical_Symbols
Markdown is in the process of being codified by http://commonmark.org
Yes the world has gone mad for VLC, but I am a big fan of mplayer2.
Under FreeBSD if you use nvidia graphics hardware and mplayer2 then you will want to compile in an enable VDPAU to enable hardware decoding. A discussion of how to do this can be found here: http://forums.freebsd.org/showthread.php?t=4756
If you play files over network from a NAS, as I do, you may want to tweak the cache settings to reduce latency when skipping forward or back: http://martin.ankerl.com/2006/06/10/pimp-my-mplayer/
Under FreeBSD my mplayer alias in
alias mplayer='sudo sysctl hw.snd.vpc_autoreset=0 && mplayer --quiet --cache=524288 --cache-min=35 -vo vdpau -ao oss
This forces VDPAU, aggressive caching, and stops the annoying volume reset whenever you skip around the file.
Solarized is a great colour scheme which I use where ever I can. Various configuration files are available for commonly used unix software.
- General landing/manifesto page
- solarized drop in colour scheme for Xresources/Xdefaults (i.e. if you use xterm)
- solarized colours for gnome terminal
- solarized colours for mutt
- solarized colours for xchat
solarized colours for FreeBSD ls for your
Vim does not need much of an introduction – it’s the evolved version of the editor that can be found on almost all unix systems, vi.
Vim is elegant, sophisticated and powerful, but with a learning curve akin to inverse exponential decay. An excellent resource for learning to use vim is vimcasts.org
To grab from source it’s easiest to use mercurial. Make a folder where you want to build into and then follow http://www.vim.org/download.php#unix
./configure --help will give you the usual compile time options
A nice guide can be found here: https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
Because I like to keep up to date vim in ~/bin and pkgng already had vim 7.3 installed I then installed the runtime files manually
sudo cp -rv /usr/home/mike/bin/vim_source/hg/runtime /usr/local/share/vim/vim74 cd /usr/share/ sudo mkdir vim cd vim sudo ln -s /usr/local/share/vim/vim74
gvim is just a symlink to vim
To automatically sort the font in gvim on opening see the .vimrc edit recommended here: http://vim.wikia.com/wiki/Change_font
There exists a great plugin called pathogen which allows the management and use of further plugins for vim both convenient and elegant, and so it is worth installing pathogen before adding other plugins.
Other plugins I use are:
For use with Pathogen: https://github.com/altercation/vim-colors-solarized
Now you can cat your source code files with syntax highlighting
I use the below script to sort out vim plugins on a fresh installation
Rsync syncs two directories. Especially remotely this makes a lot more sense that simply copying with
cp. Depending on the flags used you can change the heuristic with which it works out which files are new/changed.
It is available using brew for OSX will be available using the package manager in linux/BSD if not installed by default.
Also worth checking out is the script at https://github.com/dparoli/hrsync which implements some hard-link magic described here https://lincolnloop.com/blog/detecting-file-moves-renames-rsync/. This means that you can rename files and folders and
rsync will still work as you would hope.