Bash script to automatically convert git submodules to regular files

August 3, 2016

Git submodules drive me batty! They are a great idea in theory however in practical application they are a pain in the butt to work with. I have a project that has accumulated over a dozen submodules over the past couple years. Switching branches and merging anything has become excruciating. This morning was the last straw.

Find largest files in a directory using the terminal

June 1, 2016

If you need to find out what the largest files are in a directory and subdirectories here is a command you can run that will find the top 5 largest files. find . -type f | sed ‘s/.*/”&”/’ | xargs ls -Slh | head -n 5 Breakdown: find . -type f: Find all files in

Autocomplete git branches and commands in bash

February 10, 2016

The tab completion for commands in bash is awesome, but it does not work for bash out of the box. Lucky for us it is relatively easy to get bash completion working. You will need two things, a copy of the completion script and an update to your bash profile. The completion script is available

Fix “frozen” Evernote app when fullscreen on OS X

October 20, 2015

The Problem: When you start Evernote it goes into fullscreen mode. You are not able to use any features of Evernote and hear the “Do not click me” error sound. The Cause: There is some sort of message box that has popped up. You need to close this before using Evernote, however it has popped

List size of directories in the current folder in terminal

October 5, 2015

If you would like to list the size of all the directories in your current folder run the following command: [bash]du -a -h –max-depth=1 | sort -hr[/bash] This will provide output similar to [bash] 69M . 36M ./plugins 16M ./.git 14M ./themes 3.4M ./uploads 8.0K ./.DS_Store 4.0K ./upgrade 4.0K ./.revision 4.0K ./index.php [/bash]