This gist is part of a blog post. Check it out at here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### Keyboard #################################### | |
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
#################################### Trackpad #################################### | |
# Enable tap to click on a Magic Trackpad | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Renaming old files to <file>_old." | |
mv ~/.bashrc ~/.bashrc_old 2>/dev/null | |
mv ~/.inputrc ~/.inputrc_old 2>/dev/null | |
mv ~/.profile ~/.profile_old 2>/dev/null | |
mv ~/.vim ~/.vim_old 2>/dev/null | |
mv ~/.vimrc ~/.vimrc_old 2>/dev/null | |
echo "Downloading dotfiles." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test : test.o | |
gcc test.o -o test | |
test.o : test.c | |
gcc -c test.c | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'gmail' | |
config_file = "#{ENV['HOME']}/.gmail" | |
unless File.exist?(config_file) | |
puts "You need to type your email and password (one per line) into `~/.gmail`." | |
exit!(1) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cursor movement | |
h - move left | |
j - move down | |
k - move up | |
l - move right | |
ctrl-b - page up | |
ctrl-f - page down | |
% - jump to matching brace | |
w - jump by start of words (punctuation considered words) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! ChromeReload() | |
let applescript = "-e \"tell application \\\"Google Chrome\\\" to tell the active tab of its first window \r | |
\reload \r | |
\end tell \r | |
\tell application \\\"Google Chrome\\\" to activate\"" | |
silent exec "!osascript " . applescript | |
endfunction | |
command! ChromeReload call ChromeReload() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git config --global commit.template $HOME/.dotfiles/git/gitmessage.txt | |
[Subject]: | |
Added: | |
Change: | |
Fix: | |
Deleted: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -d "/Developer/Applications/Xcode.app" ]; then | |
echo "Please install Xcode first. Exiting." | |
exit 1 | |
fi | |
sudo echo "" | |
OlderNewer