NCurses Disk Usage
A useful Command Line Iterface (CLI) for exploring disk usage:
ncdu
Example output.
ncdu 2.9.1 …A useful Command Line Iterface (CLI) for exploring disk usage:
ncdu
Example output.
ncdu 2.9.1 …When TeX/LaTeX is fully justifying text there are times when it could do better but it does not know …
read moreparbox is a LaTeX command used to place a box around text.
Remeber that optional arguments are in [] (Square brackets …
read moreLaTeX macros can be used as simple text replacments for example:
\documentclass{article}
\newcommand{\LUG}{LEGO User Group}
\begin{document …WYSIWYG editor for LaTeX lyx, and a manager for Bibliography JabRef.
Lyx Tutorial: Lyx mac Guide
JabRef Tutorial: Getting Started …
read moreApples default directory structure is :
/Users/username
├── Desktop
├── Documents
├── Downloads
├── Library # Hidden by default
├── Movies
├── Music
├── Pictures
├── Public
My current …
read moreAfter accidentally scrolling back a page when browsing the web in chrome too many times. Figured out how to disable …
read moreWhen . just will not do (repeats last action) because you need to capture a movement as well, macros are quick …
1 2 3 4 5 6 7 8 | |
To prepend to to filenames
cd to_folder
ls | xargs -I {} mv {} addthis-{}
or target jpgs
cd to_folder
ls *.jpg | xargs …Just realised there is a difference between word and WORD in Vim.
WORD is non-blank delimited by whitespace. word is …
read moreI just discovered the xkill command, when a window has crashed you
can call xkill and get a skull and …
To redirect stdout and stderr in bash we use:
./ShellFile.sh &> test.log
However in tcsh that results in:
Invalid …When creating my blog I have been inconsistent with the tag command line, Command line and
Command Line the case …
Enter copy mode
ctrl-a [
Use cursors of vim motions to move to relevant area.
Space to start selection, space again …
read moreSince upgrading to Mavericks I get a sound whenever I get mail. I find this very annoying so first port …
read moregit tag -a 0.0.1 -m "Tag comment"
git push --tags
Note: The use of major.minor.patch Semantic …
read moreRemoval of substring:
string="test string"
echo $string
remove="test"
short_string=${string#$remove}
echo short_string
Note that inside the ${} string …
In your sources branch, which is the main branch for writing creating posts, create a CNAME file in the sources …
I use gitx graphical tool on OS X to find the SHAs for commits. Revert back …
Sometime ago I enabled focus tracking the mouse on Gnome. It took a while to find how to disable it …
read moreReceived the following errors when doing brew update on mountain lion:
error: The following untracked working tree files would be …$ git submodule update
fatal: Needed a single revision
Unable to find current revision in submodule path 'vim/bundle/systemverilog'
To …
read moreI use to use svn revert to roll back local modification and get back to the state I was in …
This is not a foolproof method, as vim colorschemes are just vim commands but by default they set:
let g …Here are some aliased commands which stop line wrapping on really long lines, making the output much more readable:
# Stop …Deciding to see if I could make my vim status line a bit more practical for myself. I decided to …
read moreGood programming practice is to use spaces to indent code rather than tabs. Due to tabs often being rendered differently …
read moresetenv allows sub shells to inherit the value.
set x = "twenty"
echo $x
> twenty
## New Shell
csh
echo $x …cat /etc/redhat-release
Returns some thing like:
Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Find Kernel version using …
read moreTo check if an environment variable exists in .mycshrc or shell scripts
if ($?TERM) then
echo "TERM is $TERM"
endif …I have decided to clean up my vim colorschemes. I have been using ir_black for sometime but it does not …
read moreStackoverflow have supported markdown for a while. The syntax for showing an image is :
![Holes in Leaf 1][1]
[1 …After struggling to get the rake task for octopress to deploy I decided to fall back to the command line …
read moreISO 8601, to me looks a lot like reversed British format which has been my standard for including in file …
read moreTo enable code folding in Vim type (from normal mode):
:set foldmethod=marker
Or add this to your .vimrc
set …After running a brew upgrade rtorrent was plagued with segmentation faults. Which look something like :
Caught Segmentation fault, dumping stack …To capture the screen on OS X :
⇧⌘4 : Selected area to capture.
⇧⌘4-space : Capture a window.
These are defined in …
read moreAfter getting Safari 6 it seems that YouTube is no longer letting my watch video as html5 video formats and …
read moreFor code reuse within I have found Subversion externals really nice to work with. Instead of copy and pasting code …
read moreThis is based on a guide to adding retina support to websites.
To add a tiled (repeating) background cretae 2 …
read moreIf entering Mission Control (ctrl-up) is taking to long you can speed up the animation entering the following in the …
read moreA the time of writing Google exchange syncing only works on mobile devices, which is slightly annoying but mail, contacts …
read moreTHIS NO LONGER WORKS, IF IT EVER DID :(
When you add a link to safari, it replaces the link to …
read moreIn gvim and mvim incorrect spellings are highlighted with a squiggly underscore ala MS Word. vim in a terminal (xterm …
read moreFor ssh and ping to local machines with out the .local extension I added them to my /ets/hosts file …
read moreIf you use the ⌘I shortcut in finder with a file selected you get a 'Get Info' window. If you …
read morectrl-6
For the example we will create 3 new temp files and then open them in vim.
touch vim_test1 …From OS X Lion the Users Library folder has been hidden. To find it make Finder the active application, that …
read moreThere is currently a preview (Beta) of [Little Snitch 3][littelsnitch3]. If you have not come across Little …
read moreSome info on what has changed in Xcode 4.3. Latest is 4.4 but a lot changed in 4 …
read more/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
To Reset it back to this value run (from /Applications/Utilities …
read more/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
To Reset it back to this value run …
read moreI have specifically been trying to find out how to transfer my full GB Memory Map OS 1:50K 2012 …
read moreOne of the limitations of mountain lion is that they are only going to support 64 bit Kernel extensions, the …
read moreThe subscribe button on the iPad youtube app is quite well hidden.
View a video from the channel you are …
read moreGot the steam punk Gelaskins case yesterday, they can be a fiddle to fit but incredibly thin and adds grippines …
read moreIn iOS 5 If you have iTunes Match enabled ie to download your songs from the iCloud while on the …
read moreA recent article by sef about how to judge an engineering companies respect engineers and the strength of the engineering …
read moreWhen working behind a restrictive firewall, which limits ssh connections you may be running into some of the following errors …
read moreI started off following the ubuntu guide for installing a new drive, which uses fdsik to create the partitions how …
read moreSometime a script needs to now the directory that it is executing from, the best solution for this is:
DIR …Entering the following command in to your .bashrc seems like a simple way forward.
xmodmap -e "remove lock = Caps_Lock"
However …
read moreIf you are working on a new system or with multiple environments it is good to know what type of …
read moreAnswer:
svn commit -m $'Line 1 \nLine 2'
Committing to subversion on the command line and using escaped …
read moreCron jobs can have there results returned as mail via the unix mail system. If left unchecked for a while …
read moreA simple script for finding temp files from the current directory and below. I often run this before adding a …
read morectrl-r "
Actually ctrl-r reg, where " is the unnamed register from the last yank or delete.
If you have done …
read moreI noticed today that greps recursive function is different to finds recursion.
find ./ -name *.txt
grep -R 'text' *.text
The …
read moreThis assumes that origin is the label for github.
Tagging a github repo for my gem releases I do:
$ git …The new (July 2011) Mac Book Air is now out, shipping with Lion.
The combination of these two fixes some …
read moreUsing ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read moreUsing ssh to securely connect with servers from the terminal is pretty easy. set up a public key and a …
read moreAn old guide is written on the Apple Developer Forum however if you are using Homebrew it is much simpler …
read moreThis vim plugin will allow you to gist directly from vim, simple way is just :Gist to gist entire file …
read moreI have not fully read it but it looks like this is a good guide to bash scripting. A few …
read moreIn Vim to insert text before the cursor press 'i', to insert text after cursor 'a' or to edit at …
read moreIf a torrent application has been running and torrents start showing a status of 'unregistered torrent' a likely cause is …
read moreConsidering various raid strategies I decided that Raid 5 would be too limiting and have previously found raid striping systems …
read moreI have been running into issues with screen when switching to another user:
$ su otheruser
> password
$ screen -x
> Cannot open …I think it is good practise to create a read only tag when releasing an application. This allows you to …
read moreCurrently OS X 10.6.3 - 10.6.5 the ncursers library is broken. A hacky fix is to copy …
read moreFor various reasons Mac OS X (at least 10.6) can get the system cache out of sync with the …
read moreThe new EC2-Pricing also includes a new Micro service. This micro service is intended for small apps servicing tens of …
read moreThe Preferences menu in OS x give you the option to turn off Hard Disks whenever possible to save power …
read moreAs this seemed to be a useful post on my old blog I am reposting it. Just in case the …
read moreGrep is a unix (and mac os x) command line tool to search files for text.
1) Search for all …
Following this article lets you turn a executable java .jar into a mac appliction (.app). The Tools are only available …
read moreAfter adding some USB2 (NTFS formatted) drives to a headless Ubuntu server, they were not auto-mounted so I had to …
read morePragmatic TV release there screen casts in iPod, Quicktime and Theora Ogg formats. Since Theora Ogg seems to be the …
read moreThis snippet can be added to you ~/.vimrc to highlight long lines.
" Highlight lines over 80 characters long with red …To search in Vim just press (apple-f for macvim) / then search string.
/search
This will highlight all occurrences of 'search' …
read moreHomebrew is a new package management system for Mac OS X. A good review/tutorial on EngineYard.
Update 20-August-2010
Then …
MacBook3,1 (2007) Intel Core 2 Duo 2.2GHz Hard drive and memory upgraded to 320GB and 4GB
Graphics GMA …
read moreThe *.m4b extension is used for audiobooks on the iTunes Store and is a convenient (if you have an iPod …
read moreI have written a few command line tools in ruby which I use to perform file system maintenance. Mainly sorting …
read moreOpen office by default does not have a mode to auto start the presentation when launched. With the ImpressRunner plugin …
read moreI do not like having to use sudo to run development servers for testing web applications. sudo should be reserved …
read moreDirectory listing can be enabled (disabled by default) by adding this:
autoindex on;
Example usage
http{
server {
#Server with no …By default git status returned differences in file permissions. To turn if off run:
$ git config core.filemode false
I recently documented how I installed Ruby Enterprise and nginx on Mac OS X. Here we see how to make …
read moreFluke for mac can be used to get iTunes playing FLAC audio files. However it is currently broken for Snow …
read more