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 | |
# This file demonstrates a simple experiment to make a hierarchy of config classes | |
# where each class can simply define a hash of config values which augment/override | |
# those of it's parent class. Each class uses class methods to access the config | |
# values by name. In addition to the config hash, each class can define custom | |
# class methods that combine/format config values, even if those values are actually | |
# defined in an ancestor or descendant class. | |
class BaseConfig |
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 | |
# Shows how to do replacment in a string variable in bash. | |
SRC_STRING=/Applications/something | |
REPLACED_STRING=${SRC_STRING//\//\\/} | |
echo "Source String is: $SRC_STRING" | |
echo "Replaced String is: $REPLACED_STRING" |
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 | |
# | |
# Drops all the tables in a MySQL database, without dropping the databse. | |
# | |
############################################################################### | |
# Usage | |
############################################################################### | |
usage=<<EOT |
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 | |
# | |
# Quick-and-dirty script to kill rogue script/server processes. | |
# | |
############################################################################### | |
# Configuration | |
############################################################################### | |
# The command you use to run your Rails server. |
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 | |
# | |
# Script to search for a string in a set of configured dirs. The main | |
# value of this is to provide: | |
# | |
# * Easy configuration for a common set of directories you like to | |
# grep through, and the file patterns to match per directory. | |
# | |
# * Easy configuration for the common grep options you like to use. | |
# |
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 | |
# | |
# Script to create an SSL .pem certificate. | |
# | |
# Adapted from Fedora's /etc/pki/tls/certs/Makefile. Only tested on | |
# Mac OS X 10.5. | |
# | |
PEMFILE=$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
#!/bin/sh | |
# | |
# Checks to see if an NFS-mounted dir is wedged. | |
# | |
# Sometimes the NFS mount goes down. Other tactics like rpcinfo didn't | |
# pan out, so this hack is just based on trying to ls the mounted dir | |
# and timing that out if it doesn't respond quickly. | |
# | |
# Usage: check_nfs.sh <dirpath> | |
# |
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
alias reload='. ~/.bashrc' | |
alias ea="$EDITOR ~/bin/dotfiles/bash/aliases && reload" | |
alias ee="$EDITOR ~/bin/dotfiles/bash/env && reload" | |
alias eh="$EDITOR ~/bin/dotfiles/bash/heroku && reload" | |
# Processes | |
alias tu='top -o cpu' | |
alias tm='top -o vsize' | |
# Projects |
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 | |
# | |
# Previews a markdown file in the browser. | |
# | |
# Usage: markdown <filename> | |
# | |
# Requires: gem install maruku | |
# | |
infile = ARGV[0] |
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
= Ruby Packaging Standard | |
The aim of this document is to specify a common structure of how a | |
Ruby package distributed as source (that is, but not limited to, | |
development directories, version-controlled repositories, .tar.gz, | |
Gems, ...) should conform to. | |
(See RFC 2119 for use of MUST, SHOULD, SHALL.) | |
== Library files |
OlderNewer