This file contains 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
# thor install http://gist.github.com/50043.txt | |
# thor cat:task some:task | |
# thor cat:task thor:runner:install # built-in tasks | |
require 'ruby2ruby' | |
class Cat < Thor | |
$requires = [] | |
module ::Kernel | |
def require_with_record(file) |
This file contains 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
tell application "Twitterrific" | |
open location "http://search.twitter.com/search?q=%40" & screen name of selection | |
end tell |
This file contains 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
tell application "Twitterrific" | |
set peep to screen name of selection | |
set twid to id of selection | |
open location "http://twitter.com/" & peep & "/status/" & twid | |
end tell |
This file contains 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
# available domain names | |
# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html | |
domainavailable() { | |
if whois $1 | grep "No match for" &>/dev/null; then | |
echo "$1 is available" | |
return 0 | |
else | |
echo "$1 is not available" | |
return 1; | |
fi |
This file contains 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
-- save as "Add Pinboard Bookmark.scpt" in ~/Library/Scripts/Applications/Safari | |
-- assign it ⌘D in FastScripts to use instead of Safari's bookmarks | |
tell application "Safari" | |
set pinboardBookmarklet to " | |
document.location = 'http://pinboard.in/add?next=same' + | |
'&url=' + encodeURIComponent(location.href) + | |
'&title=' + encodeURIComponent(document.title); | |
" | |
do JavaScript pinboardBookmarklet in document 1 |
This file contains 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
export PATH=$HOME/bin:/usr/local/bin:/usr/local/git/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/X11R6/bin:$PATH | |
source /usr/local/git/contrib/completion/git-completion.bash | |
prompt_status() { | |
local branch=$(__git_ps1 "%s") | |
if [ -n "$branch" ]; then | |
if git_dirty; then | |
echo "⚡" | |
return |
This file contains 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
// http://1kbgrid.com as a sass file. | |
@for !i from 1 through !number_of_columns | |
.grid_#{!i} | |
width = (!column_width + !gutter_width) * !i - !gutter_width | |
.column | |
margin = "0 #{!gutter_width / 2}" | |
overflow: hidden | |
float: left |
This file contains 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
# Rack file for local Rubygems server, using YARD | |
require "rubygems" | |
require "yard" | |
libraries = {} | |
Gem.source_index.find_name('').each do |spec| | |
libraries[spec.name] ||= [] | |
libraries[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem) | |
end |
This file contains 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
# repair busted iTunes file locations with macirb | |
framework 'ScriptingBridge' | |
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.itunes") | |
load_bridge_support_file 'iTunes.bridgesupport' | |
class SBElementArray | |
def [](value) | |
self.objectWithName(value) |
This file contains 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
export PS1='\[\033]0;\w\007\[\033[0;32m\]\W\[\033[0;38m\] $(git_branch)$(prompt_status "%s") ' | |
prompt_status() { | |
local branch=$(__git_ps1 "%s") | |
if [ -n "$branch" ]; then | |
if git_dirty; then | |
echo "⚡" | |
return | |
fi |
OlderNewer