Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wtowns on github.
  • I am wtowns (https://keybase.io/wtowns) on keybase.
  • I have a public key whose fingerprint is 1E8E E249 EF42 3077 DC7C E431 977C 8750 CB70 0CF7

To claim this, I am signing this object:

# Custom prompt: User@Location (current git branch)\n$
if type -t __git_ps1 | grep -q '^function$' 2>/dev/null; then
export PS1='\[\033[0m\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\]$(__git_ps1) \[\033[0m\]$ '
else
export PS1='\[\033[0m\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\] \[\033[0m\]$ '
fi
@wtowns
wtowns / gist:1141467
Created August 12, 2011 04:30
Somber Wood of Lost Citizens: Buildings Log
[rp][lien=https://gist.github.com/gists/1141467]Source[/lien]
[g]Changes:[/g]
-updated zombie counts
-updated Shady Bar
-updated Construction Site
[/rp]
:fleche:[g](-5/5) -[/g] :home: [g][i]Scottish Smith's Store[/i][/g] [bad]([/bad][g]10[/g] :ap:[bad])[/bad]
- :camp: [i]Not Camped[/i] :!!:
@wtowns
wtowns / gist:1049423
Created June 27, 2011 18:19
Copy to/from system clipboard in Vim
Yank: "+y
Paste: "+p
@wtowns
wtowns / gist:1014861
Created June 8, 2011 17:20
Generate ctags
ctags --recurse --extra="+fq" --fields="+Si"
+f creates a tags entry for the file itself, useful to jump to a file
+q adds class-qualified tags for each member of a class. The ctags docs say that this is only implemented for C++, Java and Eiffel. It works in C#, I presume, because C#'s syntax is close to Java in this respect.
--fields="+Si"
+S causes signature info to show up in :tselect
@wtowns
wtowns / gist:1001307
Created May 31, 2011 21:17
(vim) Convert from dos/unix to dos
To convert the current file from any mixture of CRLF/LF-only line endings, so all lines end with CRLF only:
:update Save any changes.
:e ++ff=dos Edit file again, using dos file format ('fileformats' is ignored).[A 1]
:w Write buffer using dos (CRLF) line endings.
@wtowns
wtowns / p4merge Windows settings
Created October 7, 2010 18:13
.gitconfig settings to use p4merge in Windows
[diff]
tool = p4merge
[difftool "p4merge"]
cmd = "p4merge.exe $LOCAL $REMOTE"
[merge]
tool = p4merge
[mergetool "p4merge"]
cmd = "p4merge.exe $BASE $LOCAL $REMOTE $MERGED"
trustExitCode = true
keepBackup = false