Skip to content

Instantly share code, notes, and snippets.

@tancredi
tancredi / zap.zsh-theme
Created October 17, 2013 18:18
Simplest possible oh-my-zsh theme with git branch and dirty flag
#!/usr/bin/env zsh
PROMPT='%{$terminfo[bold]$fg[red]%}> %{$reset_color%}'
RPROMPT='%{$terminfo[bold]$fg[red]%}$(git_prompt_info) %{$fg[green]%}$(echo $USER)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
@tancredi
tancredi / onceAnimationFinished.js
Created October 17, 2013 18:09
Function to attach a callback to the end of the current/next CSS animation. Useful when dealing with chained animations.
function getPrefixedEvents (str) {
var prefixes = [ '', 'webkit', 'o', 'MS', 'moz' ],
out = [],
i, prefix, cur;
for (i = 0; i < prefixes.length; i += 1) {
prefix = prefixes[i];
cur = prefix + str;
if (prefix.length < 2) {