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
# add this to your .bash_profile or your .zshrc or whatever | |
# then use sg (or your preferred abbreviation) instead of script/generate | |
# and never forget to run migrations again | |
function sg() { | |
script/generate $@ | |
echo "Would you like to run the migrations right now?" | |
read CHOICE | |
if [ "$CHOICE" = "y" ] || [ "$CHOICE" = "yes" ] | |
then | |
echo "rake db:migrate" && rake db:migrate |
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
############################################ | |
## uncomment these lines for CGI mode | |
## make sure to specify the correct cgi php binary file name | |
## it might be /cgi-bin/php-cgi | |
# Action php5-cgi /cgi-bin/php5-cgi | |
# AddHandler php5-cgi .php | |
############################################ | |
## GoDaddy specific options |
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/zsh | |
mkdir -p /tmp/gist | |
cd /tmp/gist | |
curl http://github.com/defunkt/gist/raw/master/gist.rb > gist | |
chmod 755 gist | |
sudo mv gist /usr/local/bin/gist | |
echo "Command-line Gist is now installed" |
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
def date_to_epoch(date, offset) | |
Time.local(date.year, date.month, date.day + offset).to_i | |
end | |
# example: | |
# departure_date = Date.today | |
# days_until_return = 1 | |
# puts date_to_epoch(departure_date, days_until_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
#!/bin/bash | |
########################################################### | |
# TRIBUNE-SPECIFIC BUILD HOME script: | |
# This script sets up your home directory fast with basic | |
# necessities and amenities, to give you sanity when you | |
# work on a Unix box where you don't have root access. | |
########################################################### | |
# TO USE: | |
# curl https://raw.github.com/gist/259348/build_home.sh | bash | |
# OR: |
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
/** | |
* Smokescreen v0.1.2 - Chris Smoak <[email protected]> | |
* A Flash player written in JavaScript. | |
* | |
* Copyright 2010, RevShock | |
* | |
* Date: 2010-05-27 | |
*/ | |
var Smokescreen = function(url, element, width, height, name, params) { | |
goog = {}; |
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
require 'feedzirra' | |
# fetching a single feed | |
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing") | |
# feed and entries accessors | |
feed.title # => "Paul Dix Explains Nothing" | |
feed.url # => "http://www.pauldix.net" | |
feed.feed_url # => "http://feeds.feedburner.com/PaulDixExplainsNothing" | |
feed.etag # => "GunxqnEP4NeYhrqq9TyVKTuDnh0" |
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
Just a informational gist if you plan to install "beanstalkd" via MacPorts and get a compiler error: | |
:info:build net.c: In function 'make_server_socket': | |
:info:build net.c:35: warning: 'fd' may be used uninitialized in this function | |
:info:build make[1]: *** [net.o] Error 1 | |
:info:build make[1]: *** Waiting for unfinished jobs.... | |
This is a known issue within the "net.c" file. I've found a diff[1] for said file on the web and applied it locally which then allowed me to install the port without problems. | |
If your install fails like: |
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/bash | |
############################################################### | |
# BUILD HOME script: | |
# This script sets up your home directory fast with basic | |
# necessities and amenities, to give you sanity when you | |
# work on a Unix box where you don't have root access. | |
############################################################### | |
### TO USE: | |
# wget https://gist.github.com/raw/3639058/build_home.sh | |
# bash build_home.sh |
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/bash | |
TMUX_VERSION="1.7" | |
LIBEVENT_VERSION="2.0.20" | |
NCURSES_VERSION="5.9" | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. |
OlderNewer