Skip to content

Instantly share code, notes, and snippets.

" Load pathogen
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype plugin indent on
set nocompatible
syntax on
" Fixes for xterm-256colors
@wyattanderson
wyattanderson / output.txt
Created June 16, 2014 01:09
UFW Salt Module
root@ufw-test:/srv/salt/_modules# salt-call --local ufw_firewall.set_enabled
local:
Firewall is active and enabled on system startup
root@ufw-test:/srv/salt/_modules# salt-call --local ufw_firewall.status
local:
----------
app_policy:
skip
default:
----------
@wyattanderson
wyattanderson / private.xml
Created June 13, 2014 14:26
Remap Cmd-Esc to Cmd-`
<?xml version="1.0"?>
<root>
<item>
<name>Command-Escape to Tilde in Chrome</name>
<only>GOOGLE_CHROME</only>
<identifier>private.chrome_cmd_esc_to_cmd_tilde</identifier>
<autogen>
__KeyToKey__
KeyCode::ESCAPE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND,
KeyCode::BACKQUOTE, ModifierFlag::COMMAND_R,
@wyattanderson
wyattanderson / tmux.conf
Created August 27, 2012 22:12
Prompt for a color to set your tmux tab to
bind-key C command-prompt -I colour160 -p color,active-title "set-window-option window-status-format '#[fg=white,bg=%1] #I #W '; set-window-option window-status-current-format '#[fg=colour17,bg=%1]⮀#[fg=white,bg=%1,noreverse,bold] #I ⮁ #W%2 #[fg=%1,bg=colour17,nobold]⮀'"
@wyattanderson
wyattanderson / .vimrc
Created February 15, 2012 19:09
Progressively highlight long lines in Vim
" Highlight lines longer than 80 characters as dark-red, lines longer than 90
" characters as a brighter red.
augroup vimrc_autocmds
autocmd BufEnter * highlight OverLength ctermbg=red guibg=#990000
autocmd BufEnter * highlight SortaOverLength ctermbg=red guibg=#330000
autocmd BufEnter * match SortaOverLength /\m\%>80v.*\%<91v/
autocmd BufEnter * 2match OverLength /\m\%>90v.*/
augroup END
@wyattanderson
wyattanderson / gist:1264760
Created October 5, 2011 15:38
Unique Hostname Colorization
# Calculate a short checksum of the real hostname to determine a unique color
if [[ $TERM =~ "256color" ]]; then
host_color="38;5;$((16 + $(hostname | cksum | cut -c1-3) % 256))";
else
host_color="1;$((31 + $(hostname | cksum | cut -c1-3) % 6))";
fi