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 | |
DIR="${1}" | |
if [ ! -d "${DIR}" ]; then | |
echo "call me with a directory, e.g.:" | |
echo "${0} /some/path/to/dir" | |
exit 1 | |
fi | |
gnome-terminal --geometry=130x35+345+250 \ |
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
# this file resides in dev_tools/github.rb of mms2r's project | |
# based on Trouble shooting section in http://gems.github.com/ | |
require 'rubygems' | |
require 'rubygems/specification' | |
data = File.read(File.join(File.dirname(__FILE__), "..", "mms2r.gemspec")) | |
spec = nil | |
result = Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join | |
puts spec | |
(!!result) ? exit(0) : exit(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
# a test harnessing the exit result from dev_tools/github.rb | |
require 'test/unit' | |
require 'rubygems' | |
class TestGithub < Test::Unit::TestCase | |
def test_build_github_gem | |
result = `ruby #{File.join(File.dirname(__FILE__), "..", "dev_tools", "github.rb")}` | |
puts result | |
assert_equal 0, $?.exitstatus |
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 self.notify title, msg, img, pri='low', time=5000 | |
msg.gsub!("'", '"') | |
folder = "/usr/share/icons/gnome/16x16/emblems/" | |
`notify-send -i #{folder}#{img} -u #{pri} -t #{time} '#{msg}'` | |
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
def self.notify title, msg, img, pri='low', time=5000 | |
msg.gsub!("'", '"') | |
folder = "/usr/share/icons/gnome/16x16/emblems/" | |
`notify-send -i #{folder}#{img} -u #{pri} -t #{time} '#{msg}'` | |
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
To: [email protected], [email protected] | |
From: Mike Mondragon <[email protected]> | |
Date: Thu, 16 Apr 2009 15:52:28 -0700 | |
Subject: Apple Cup permanently moving to Qwest Field | |
President Floyd, WSU Alumni Association: | |
I would like to express my disapproval of even considering moving the | |
Apple Cup permanently to Qwest Field. I live next to Seattle so it | |
would be convenient for me, but it would erode yet another tradition |
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
mike@daisy 10041 ~/builds/memcached-1.2.8$ sudo gem install peep -- --with-memcached-include=/usr/local/include/libmemcached/ | |
Building native extensions. This could take a while... | |
ERROR: Error installing peep: | |
ERROR: Failed to build gem native extension. | |
/usr/local/bin/ruby extconf.rb --with-memcached-include=/usr/local/include/libmemcached/ | |
checking for #include <memcached.h> | |
... yes | |
checking for sys/ptrace.h... yes | |
checking for sys/ptrace.h... yes |
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 | |
# /etc/init.d/sphinx: start the sphinx search daemon. | |
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin | |
PIDFILE=/opt/local/var/db/sphinx/log/searchd.pid | |
BINPATH=/usr/local/bin/searchd | |
SPHINX="--config /etc/sphinx/sphinx.conf" |
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 'rubygems' | |
require 'dynect' | |
# For accessing Dynamic Network Services, Inc. DNS services. | |
# Use Dynect gem to update a CNAME with an EC2 Private DNS name | |
# http://rubyforge.org/projects/dynect/ | |
# by Mike Mondragon mikemondragon _AT_ gmail | |
customer = ENV['DNECT_CUSTOMER'] | |
username = ENV['DNECT_USERNAME'] |
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
# origin of work http://henrik.nyh.se/2008/12/git-dirty-prompt | |
function parse_git_dirty { | |
status=`git status 2> /dev/null` | |
dirty=` echo -n "${status}" 2> /dev/null | grep -q "Changed but not updated" 2> /dev/null; echo "$?"` | |
untracked=`echo -n "${status}" 2> /dev/null | grep -q "Untracked files" 2> /dev/null; echo "$?"` | |
ahead=` echo -n "${status}" 2> /dev/null | grep -q "Your branch is ahead of" 2> /dev/null; echo "$?"` | |
newfile=` echo -n "${status}" 2> /dev/null | grep -q "new file:" 2> /dev/null; echo "$?"` | |
renamed=` echo -n "${status}" 2> /dev/null | grep -q "renamed:" 2> /dev/null; echo "$?"` | |
bits='' | |
if [ "${dirty}" == "0" ]; then |
OlderNewer