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
--with-mysqli --with-mysql --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-openssl |
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
namespace 'rails' do | |
desc 'Remove rails tmp dirs' | |
task 'rm_tmp_dirs' do | |
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f| | |
system("rmdir ./#{f}") | |
end | |
end | |
end | |
namespace 'git' do |
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
# Scrub your production data for use in your development/staging environments. Sets all passwords to 12345 | |
# and email addresses to your email address in the format of [email protected]. Gmail (among others) allow | |
# you to add extra info to your email address with a +. | |
require 'digest/sha1' | |
class DBConn < ActiveRecord::Base | |
ActiveRecord::Base.configurations = YAML::load(File.open(File.join(RAILS_ROOT, 'config', 'database.yml'))) | |
ENV['RAILS_ENV'] ||= 'development' | |
ActiveRecord::Base.establish_connection(ENV['RAILS_ENV']) |
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
#! /usr/bin/env ruby | |
# Usage: ruby bill_generator.rb data.yml 2008-1-1 2008-12-31 | |
# Params: data file, begin date, end date | |
# begin and end date is in the format yyyy-mm-dd | |
# Sample data.yml file entries | |
# Date format is [yyyy, mm, dd] | |
# |
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
# Variation on Hashrocket's script for managing the git process | |
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html | |
# Create shell scripts out of each of these, put them in your path (~/bin for example) | |
# chmod 755 them and use like this: | |
# | |
# This version of hack is totally different than Hackrockets. I feel that hack implies | |
# that you are getting started, not finishing up. sink is Hashrockets hack. | |
# | |
# $ hack branch_name | |
# Test and Implement until done |
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 | |
# | |
# god Startup script for God monitoring tool. | |
# | |
# chkconfig: - 85 15 | |
# description: god monitors your system | |
# | |
CONF_DIR=/etc/god/* | |
PID=/var/run/god.pid |
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
# run with: god -c /etc/god/mongrel_cluster_god.rb or use an init.d script | |
# | |
# This god script will monitor all of your mongrels that are setup with mongrel_cluster. | |
# It can monitor multiple apps if the mongrel cluster configs are symlinked into a central directory like /etc/mongrel_cluster/ | |
# Mongrels are grouped by name which is derived from the mongrel_cluster symlink name | |
# i.e. /etc/mongrel_cluster/foo.conf | |
# I have those usually symlinked into the shared folder of the app | |
# group would be foo so you can control the group like this: god restart foo | |
require 'yaml' |
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/hg-growl.rb | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'ruby-growl' | |
require 'fileutils' | |
include FileUtils | |
config = ARGV[0] || "#{ENV['HOME']}/.hg-growl" |
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
# Customize the terminal tabs | |
# put this in your .profile or .bashrc | |
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; } | |
function cd() { command cd "$@"; settitle `basename $(pwd)`; } |
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
# Get http://www.ijg.org/files/jpegsrc.v6b.tar.gz | |
tar zxvf jpegsrc.v6b.tar.gz | |
cd jpeg-6b | |
cp /usr/share/libtool/config.sub . | |
cp /usr/share/libtool/config.guess . | |
sudo mkdir -p /usr/local/man/man1 | |
./configure --enable-shared --enable-static | |
make | |
sudo make install |
OlderNewer