tmux is a terminal multiplexer: it lets you run multiple terminal sessions inside a single window, split panes side by …
read moreOther articles
Command Line Disk Usage
NCurses Disk Usage
A useful Command Line Iterface (CLI) for exploring disk usage:
ncduExample output.
read morencdu 2.9.1 …TeX hyphenation
When TeX/LaTeX is fully justifying text there are times when it could do better but it does not know …
read moreTeX Paragraph Box
parboxis a LaTeX command used to place a box around text.Remeber that optional arguments are in [] (Square brackets …
read moreLaTeX macros
LaTeX macros can be used as simple text replacments for example:
read more\documentclass{article} \newcommand{\LUG}{LEGO User Group} \begin{document …Tools for Technical Writing
WYSIWYG editor for LaTeX lyx, and a manager for Bibliography JabRef.
Lyx Tutorial: Lyx mac Guide
JabRef Tutorial: Getting Started …
read more"Home Directory File Structure"
Apples default directory structure is :
/Users/username ├── Desktop ├── Documents ├── Downloads ├── Library # Hidden by default ├── Movies ├── Music ├── Pictures ├── PublicMy current …
read more"OS X disable back gesture"
After accidentally scrolling back a page when browsing the web in chrome too many times. Figured out how to disable …
read more"Vim: Macro"
When
read more.just will not do (repeats last action) because you need to capture a movement as well, macros are quick …"tcsh Remove trailing /"
read more1 2 3 4 5 6 7 8
#!/bin/tcsh set var = "helloworld/" ## http://dbaspot.com/shell/350417-sed-removing-trailing.html set …"Command line bulk file rename"
To prepend to to filenames
cd to_folder ls | xargs -I {} mv {} addthis-{}or target jpgs
read morecd to_folder ls *.jpg | xargs …"Word WORD the Difference"
Just realised there is a difference between word and WORD in Vim.
WORD is non-blank delimited by whitespace. word is …
read more"List files ignored by git"
"xkill"
I just discovered the
read morexkillcommand, when a window has crashed you can call xkill and get a skull and …"Shell redirection"
To redirect stdout and stderr in bash we use:
./ShellFile.sh &> test.logHowever in tcsh that results in:
read moreInvalid …"iTerm Exit Fullscreen"
"Fixing Mangled Octopress Tags"
When creating my blog I have been inconsistent with the tag
read morecommand line,Command lineandCommand Linethe case …"Screen Scrollback"
Enter copy mode
ctrl-a [Use cursors of vim motions to move to relevant area.
Space to start selection, space again …
read more"Mavericks Disable Mail Sound"
Since upgrading to Mavericks I get a sound whenever I get mail. I find this very annoying so first port …
read more"Git tag and push to Github"
git tag -a 0.0.1 -m "Tag comment" git push --tagsNote: The use of major.minor.patch Semantic …
read more"Bash String Manipulation"
Removal of substring:
string="test string" echo $string remove="test" short_string=${string#$remove} echo short_stringNote that inside the
read more${}string …"Octopress, Pages and Custom Domain"
In your
read moresourcesbranch, which is the main branch for writing creating posts, create aCNAMEfile in the sources …"Revert in Git"
and Remove Orphaned Commits.
I use
read moregitxgraphical tool on OS X to find the SHAs for commits. Revert back …"Gnome: disable focus tracking"
Sometime ago I enabled focus tracking the mouse on Gnome. It took a while to find how to disable it …
read more"brew update fail"
Received the following errors when doing
brew updateon mountain lion:read moreerror: The following untracked working tree files would be …"git submodule update fatal"
$ git submodule update fatal: Needed a single revision Unable to find current revision in submodule path 'vim/bundle/systemverilog'To …
read more"Reverting in git"
I use to use
read moresvn revertto roll back local modification and get back to the state I was in …"Check you current Vim colorscheme"
This is not a foolproof method, as vim colorschemes are just vim commands but by default they set:
read morelet g …"Cshrc alias loop"
Here are some aliased commands which stop line wrapping on really long lines, making the output much more readable:
read more# Stop …"Vim: Status line"
Deciding to see if I could make my vim status line a bit more practical for myself. I decided to …
read more"VIM: Convert tabs to spaces"
Good programming practice is to use spaces to indent code rather than tabs. Due to tabs often being rendered differently …
read more"set vs setenv"
setenv allows sub shells to inherit the value.
Set
read moreset x = "twenty" echo $x > twenty ## New Shell csh echo $x …"For loops in csh/tcsh"
"Find RedHat Version"
cat /etc/redhat-releaseReturns some thing like:
Red Hat Enterprise Linux Client release 5.7 (Tikanga)Find Kernel version using …
read more"Unlocking a Nokia 8310"
"tcsh check a var exists"
To check if an environment variable exists in .mycshrc or shell scripts
read moreif ($?TERM) then echo "TERM is $TERM" endif …"Terminal Colours"
I have decided to clean up my vim colorschemes. I have been using ir_black for sometime but it does not …
read more"Stackoverflow sites and images"
Stackoverflow have supported markdown for a while. The syntax for showing an image is :
read more![Holes in Leaf 1][1] [1 …"Push local folder to remote server over ssh"
After struggling to get the rake task for octopress to deploy I decided to fall back to the command line …
read more"ISO 8601 - Standardised Date Format YYYY-MM-DD"
ISO 8601, to me looks a lot like reversed British format which has been my standard for including in file …
read more"Vim Code Folding"
To enable code folding in Vim type (from normal mode):
:set foldmethod=markerOr add this to your
.vimrcread moreset …"Reverting rtorrent version on Snow Leopard"
After running a
brew upgradertorrent was plagued with segmentation faults. Which look something like :read moreCaught Segmentation fault, dumping stack …"OS X Screen Capture"
To capture the screen on OS X :
⇧⌘4 : Selected area to capture.
⇧⌘4-space : Capture a window.These are defined in …
read more"Safari 6 not playing YouTube content"
After getting Safari 6 it seems that YouTube is no longer letting my watch video as html5 video formats and …
read more"Git Submodules"
For code reuse within I have found Subversion externals really nice to work with. Instead of copy and pasting code …
read more"Retina Support for background images"
This is based on a guide to adding retina support to websites.
To add a tiled (repeating) background cretae 2 …
read more"Speed up Mission Control Animation"
If entering Mission Control (ctrl-up) is taking to long you can speed up the animation entering the following in the …
read more"Syncing Google Contacts in Mountain Lion"
A the time of writing Google exchange syncing only works on mobile devices, which is slightly annoying but mail, contacts …
read more"Syncing Safari via dropbox for pre iCloud OS X"
THIS NO LONGER WORKS, IF IT EVER DID :(
When you add a link to safari, it replaces the link to …
read more"Vim consistent spelling correction highlighting"
In gvim and mvim incorrect spellings are highlighted with a squiggly underscore ala MS Word. vim in a terminal (xterm …
read more"Get snipMate working, a #vim plugin"
"OS X Installing R"
"Mountain Lion Setup, Part 5 /etc/hosts"
For ssh and ping to local machines with out the .local extension I added them to my /ets/hosts file …
read more"OS X Get Info Summary for multiple items"
If you use the ⌘I shortcut in finder with a file selected you get a 'Get Info' window. If you …
read more"#vim toggle between last 2 edited buffers"
ctrl-6Demo
For the example we will create 3 new temp files and then open them in vim.
read moretouch vim_test1 …"Mountain Lion finding the Library folder"
From OS X Lion the Users Library folder has been hidden. To find it make Finder the active application, that …
read more"Mountain Lion Setup, Part 4 Apps"
"Mountain Lion Setup, Part 3 : Little Snitch & Dotfiles"
Little Snitch
There is currently a preview (Beta) of [Little Snitch 3][littelsnitch3]. If you have not come across Little …
read more"Xcode 4 Install, Disk Usage"
Some info on what has changed in Xcode 4.3. Latest is 4.4 but a lot changed in 4 …
read more"Mountain Lion default $PATH"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/binTo Reset it back to this value run (from /Applications/Utilities …
read more"Lion default $PATH"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/binTo Reset it back to this value run …
read more"Transferring a Memory Map 2012 map to iOS"
I have specifically been trying to find out how to transfer my full GB Memory Map OS 1:50K 2012 …
read more"Mac Mountain Lion Compatibility"
One of the limitations of mountain lion is that they are only going to support 64 bit Kernel extensions, the …
read more"Subscribe to a channel on YouTube iPad"
The subscribe button on the iPad youtube app is quite well hidden.
View a video from the channel you are …
read more"Gelaskins iPad cases"
Got the steam punk Gelaskins case yesterday, they can be a fiddle to fit but incredibly thin and adds grippines …
read more"iTunes Match and Genius, Why cant we have both?"
In iOS 5 If you have iTunes Match enabled ie to download your songs from the iCloud while on the …
read more"Big Monitor Litmus Test"
A recent article by sef about how to judge an engineering companies respect engineers and the strength of the engineering …
read more"Vim Terminal Colours"
"Using Github behind a restrictive firewall"
When working behind a restrictive firewall, which limits ssh connections you may be running into some of the following errors …
read more"Ubuntu, formatting a 3TB drive"
I started off following the ubuntu guide for installing a new drive, which uses fdsik to create the partitions how …
read more"Bash script get current script directory"
Sometime a script needs to now the directory that it is executing from, the best solution for this is:
read moreDIR …"Trying to disable Caps Lock on Unix systems"
Entering the following command in to your .bashrc seems like a simple way forward.
xmodmap -e "remove lock = Caps_Lock"However …
read more"What shell am i using?"
If you are working on a new system or with multiple environments it is good to know what type of …
read more"SVN multi-line comments on the command line "
Answer:
svn commit -m $'Line 1 \nLine 2'The Problem
Committing to subversion on the command line and using escaped …
read more"unix mail command, delete all messages"
Cron jobs can have there results returned as mail via the unix mail system. If left unchecked for a while …
read more"list_temp_files script"
A simple script for finding temp files from the current directory and below. I often run this before adding a …
read more"Vim, paste from insert mode"
ctrl-r "Actually
ctrl-r reg, where " is the unnamed register from the last yank or delete.Why
If you have done …
read more"Recursive grep, with filtering"
I noticed today that greps recursive function is different to finds recursion.
find ./ -name *.txt grep -R 'text' *.textThe …
read more"Finding Tracks not in iTunes"
"Tagging a git repo and pushing tag to github"
This assumes that
originis the label for github.
Tagging a github repo for my gem releases I do:read more$ git …"Homebrew list outdated packages"
"New Macbook Air (2011) & OS X Lion"
The new (July 2011) Mac Book Air is now out, shipping with Lion.
The combination of these two fixes some …
read more"Using ~/.ssh/config and no passowrds with Mac OS X"
Using ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read more"Using ~/.ssh/config and no passwords with Mac OS X"
Using ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read more"Setting up PostgreSQL on OS X"
An old guide is written on the Apple Developer Forum however if you are using Homebrew it is much simpler …
read more"Installing gist.vim"
This vim plugin will allow you to gist directly from vim, simple way is just :Gist to gist entire file …
read more"bash scripts and cron"
I have not fully read it but it looks like this is a good guide to bash scripting. A few …
read more"vimfu end of line character placement"
In Vim to insert text before the cursor press 'i', to insert text after cursor 'a' or to edit at …
read more"Vimfu Reindent"
"'unregistered torrent' flush the DNS"
If a torrent application has been running and torrents start showing a status of 'unregistered torrent' a likely cause is …
read more"My Backup Strategy"
Considering various raid strategies I decided that Raid 5 would be too limiting and have previously found raid striping systems …
read more"screen -x not connecting when running as an other user"
I have been running into issues with screen when switching to another user:
read more$ su otheruser > password $ screen -x > Cannot open …"Tagging a git repo for a Release "
I think it is good practise to create a read only tag when releasing an application. This allows you to …
read more"Fixing Ncursers on OS X 10.6.3+"
Currently OS X 10.6.3 - 10.6.5 the ncursers library is broken. A hacky fix is to copy …
read more"Mac OS X libSystem cache out of sync"
For various reasons Mac OS X (at least 10.6) can get the system cache out of sync with the …
read more"OS X open finder from command line"
"Remove sensitive data from git"
"Amazon Drops EC2 Web Service Prices"
The new EC2-Pricing also includes a new Micro service. This micro service is intended for small apps servicing tens of …
read more"Mac OS X Harddrive Spin Down Time"
The Preferences menu in OS x give you the option to turn off Hard Disks whenever possible to save power …
read more"Mac OS X Default Path"
As this seemed to be a useful post on my old blog I am reposting it. Just in case the …
read more"Basic grep usage"
Grep is a unix (and mac os x) command line tool to search files for text.
read more
1) Search for all …"Removing Ports OS X"
"Turn a .jar file into a mac .app"
Following this article lets you turn a executable java .jar into a mac appliction (.app). The Tools are only available …
read more"Adding USB drives to a headless Ubuntu Linux box"
After adding some USB2 (NTFS formatted) drives to a headless Ubuntu server, they were not auto-mounted so I had to …
read more"Installing git on a clean build of OS X"
"[vim] Indenting with Vim "
"OS X iTunes play .ogg videos"
Pragmatic TV release there screen casts in iPod, Quicktime and Theora Ogg formats. Since Theora Ogg seems to be the …
read more"Vim show lines over 80 charaters long."
This snippet can be added to you ~/.vimrc to highlight long lines.
read more" Highlight lines over 80 characters long with red …"Vim search and replace"
To search in Vim just press (apple-f for macvim) / then search string.
/searchThis will highlight all occurrences of 'search' …
read more"Homebrew package management for Mac OS X"
Homebrew is a new package management system for Mac OS X. A good review/tutorial on EngineYard.
Update 20-August-2010
read more
Then …"Save space on your Mac by going Monolingual"
"MacBook Power Consumption"
MacBook3,1 (2007) Intel Core 2 Duo 2.2GHz Hard drive and memory upgraded to 320GB and 4GB
Graphics GMA …
read more"M4B Audiobooks on Android"
The *.m4b extension is used for audiobooks on the iTunes Store and is a convenient (if you have an iPod …
read more"GitHub command line tools with static paths"
I have written a few command line tools in ruby which I use to perform file system maintenance. Mainly sorting …
read more"Open Office Impress AutoStart"
Open office by default does not have a mode to auto start the presentation when launched. With the ImpressRunner plugin …
read more"Mac OS X run nginx as a user process"
I do not like having to use sudo to run development servers for testing web applications. sudo should be reserved …
read more"Nginx Enable Directory Listing"
Directory listing can be enabled (disabled by default) by adding this:
autoindex on;Example usage
read morehttp{ server { #Server with no …"Stop git status monitoring file permissions"
By default git status returned differences in file permissions. To turn if off run:
read more$ git config core.filemode false"How to test subdomains on a development machine"
I recently documented how I installed Ruby Enterprise and nginx on Mac OS X. Here we see how to make …
read more"iTunes play FLAC on OS X"
Fluke for mac can be used to get iTunes playing FLAC audio files. However it is currently broken for Snow …
read more