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
#!/bin/sh | |
# Usage: license | |
# Prints an MIT license appropriate for totin' around. | |
# | |
# $ license > COPYING | |
exec sh -c "tail -n +$(expr $LINENO + 1) < $0 | sed s/DATE/$(date +%Y)/" | |
Copyright (c) DATE Ryan Tomayko | |
Permission is hereby granted, free of charge, to any person ob- | |
taining a copy of this software and associated documentation |
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
#!/bin/sh -e | |
# Usage: git-amend <commit> | |
# Amend changes staged in the index to <commit>, or edit commit message if | |
# no changes are currently staged. Modifications not staged are stashed and | |
# then reapplied once the amend and rebase operations are complete. | |
# | |
# This command rewrites history. Do not run it after <commit> or its | |
# decendants have been published to the world. | |
# | |
# This version in POSIX sh by Ryan Tomayko <tomayko.com/about> |
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
# Configure logging based on the existence of the log file. If the | |
# log file doesn't exist, logging is disable entirely and no log | |
# file will be created. If the log file does exist, logging is | |
# enabled and turned up to 11. | |
# | |
# Example is from config/environments/test.rb in a Rails app but it | |
# could easily be adapted to other environments/frameworks. | |
# Disabling logging in test environments can speed things up a bit. | |
# In your environment: |
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
# htop on macosx | |
# I have a staff writeable /usr/local/src directory where I put tarballs | |
# and stuff but you can do this under /tmp or whatever instead | |
mkdir -p /usr/local/src | |
cd /usr/local/src | |
# grab the git repo and checkout the osx branch | |
git git://github.com/AndyA/htop-osx.git | |
cd htop-osx |
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
#!/bin/sh | |
# Fetch and install the latest Chromium mac nightly build, but only | |
# if it's different from the currently installed version. An existing | |
# Chromium.app is backed up to .Chromium.app in the same directory. | |
# | |
# Install with: | |
# $ curl -L http://bit.ly/night-chrome > ~/bin/nightly-chromium | |
# $ chmod +x ~/bin/nightly-chromium | |
# | |
# To upgrade to latest chromium version: |
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
# Subject: Re: Newbie to Sinatra looking for example | |
# From: Ryan Tomayko <r@tomayko.com> | |
# To: sinatrarb@googlegroups.com | |
# Content-Type: text/plain; charset=UTF-8 | |
# | |
# > Alright, so I'm pretty new to both Sinatra and web applications, and I | |
# > was wondering if someone could write up a quick example use of | |
# > Sinatra. Basically I want to see how Sinatra handles <form>s in one | |
# > view, and then shows the input on a different view. | |
# > |
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
# ~rtomayko/.screenrc | |
# ------------------------------------------------------------------- | |
# Settings | |
# ------------------------------------------------------------------- | |
crlf off # No Microsoft linebreaks | |
startup_message off # bypass GPL notice (we're aware) | |
defscrollback 15000 # big scrollback | |
shell bash # don't start login shells | |
shelltitle "" # no title by default - set in PS1 |
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
#!/bin/sh | |
# | |
## Usage: github-open FILE [LINE] | |
## Open GitHub file/blob page for FILE on LINE. FILE is the path to the | |
## file on disk; it must exist and be tracked with the current HEAD | |
## revision. LINE is the line number or line number range (e.g., 10-50). | |
## | |
## Open foo/bar.rb in browser: | |
## $ github-open foo/bar.rb | |
## |
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
$ cat > ~/.tigrc | |
set show-date = no | |
set author-width=3 | |
<ctrl-d> | |
$ tig | |
RT harmful specs - disable them | |
KN [defunkt/master] I shine the shoes around here | |
CW don't let daemon serving ruin the public / private flow | |
CW ensure the listeners are notified, just in case | |
CW add "open sourced" event |
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
#!/bin/sh | |
file="preview.html" | |
trap "rm -f $file" EXIT | |
cat > "$file" | |
open "$file" | |
sleep 2 |