Skip to content

Instantly share code, notes, and snippets.

View itspriddle's full-sized avatar
🤘
clickity clack

Joshua Priddle itspriddle

🤘
clickity clack
View GitHub Profile
# Create a ~/.twitter/credentials.yml file.
# Example:
# name: twittername
# password: password
require 'rubygems'
require 'rest_client'
path = File.join(File.join(ENV['HOME'], ".twitter"), "credentials.yml")
user = YAML::load_file(path)
# add in your .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# http://blog.cyberion.net/2009/01/improved-bash-prompt-for-git-usage.html
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master⚡]$ # dirty working directory
#
# I've made the following ajustements:
# - Use of plumbing, that should be faster than git status porcelain.
# - Don't show my repo as dirty if it has files unknown from the index (I always have).
--- LastFM - Ban Current Track
set previousApp to name of (info for (path to frontmost application))
tell application "Last.fm" to activate
tell application "System Events" to keystroke "b" using command down
open location "x-launchbar:hide"
tell application previousApp to activate
@itspriddle
itspriddle / _git
Created July 29, 2009 20:00 — forked from jmazzi/_git
#compdef git git-add git-am git-annotate git-apply git-applymbox git-applypatch git-archimport git-archive git-bisect git-blame git-branch git-cat-file git-check-attr git-check-ref-format git-checkout git-checkout-index git-cherry git-cherry-pick git-clean git-clone git-clone-pack git-commit git-commit-tree git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport git-cvsserver git-daemon git-describe git-diff git-diff-files git-diff-index git-diff-stages git-diff-tree git-fast-import git-fetch git-fetch-pack git-fmt-merge-msg git-for-each-ref git-format-patch git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-http-fetch git-http-push git-imap-send git-index-pack git-init git-instaweb git-local-fetch git-log git-lost-found git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-one-file git-merge-tree git-mergetool git-mktag git-mktree git-mv git-name-rev git-pack-objects git-pack-redundant git-pack-refs
" Vim color file
" Maintainer: Roman Gonzalez <romanandnreg at gmail dot com>
" Last Change: 2009 Aug 11
" Version: 0.0.1
" Screenshot: http://img.skitch.com/20090811-ti4b27qbftjybmau32ruygjjwx.jpg
" URL: http://blog.romanandreg.com
" For now this will only work on gvim
set background=dark

Vim

autocmd BufWritePre * :%s/\s\+$//e

Emacs

(add-hook 'before-save-hook 'delete-trailing-whitespace)

Textmate

@itspriddle
itspriddle / devlog
Created February 9, 2010 21:22 — forked from defunkt/devlog
#!/bin/sh -e
# Usage: $ devlog [LOG]
#
# LOG is 'log/development.log' by default
# Run in RAILS_ROOT
clear && tail -f -n 0 ${1:-log/development.log}
update_current_git_vars
@itspriddle
itspriddle / less.vim
Created April 17, 2010 01:49 — forked from bryanjswift/less.vim
LESS CSS for pathogen
au BufRead,BufNewFile *.less set ft=less syntax=less
#!/bin/bash
if [ $# -eq 0 ]; then
echo "$0 /path/to/log"
exit
fi
# Escaped color codes
BLACK=`echo -e '\033[0;30m'`
DK_GREY=`echo -e '\033[1;30m'`