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 webshare='python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"' |
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 | |
# OSX friendly version by jeff donovan | |
# | |
# Grep for a pattern through a Postfix mail log, collect the message ids into a temporary | |
# file and then grep for all occurrences of the ID's in the maillog. | |
# This is a very intensive operation since it requires 1+N greps through the entire log file, | |
# where N is the number of unique ID's returned from the first grep. | |
# | |
# Usage sample: |
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
<style type="text/css"> | |
#left { | |
float: left; | |
width: 200px; | |
} | |
#right { | |
margin-left: 200px; | |
} | |
</style> | |
<div> |
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 | |
# | |
# Find all the rails projects from this directory down and clear their log | |
# files to save some space. | |
# | |
base=`pwd` | |
for path in `find $base -type f -path '*/config/environment.rb'` | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'daemons' | |
require 'rufus/scheduler' | |
scheduler = File.join(File.dirname(__FILE__), 'scheduler.rb') | |
options = { | |
:app_name => 'scheduler', | |
:ARGV => ARGV, |
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
after "deploy:update_code", "deploy:write_sha1" | |
namespace :deploy do | |
desc "write sha1 to file" | |
task :write_sha1 do | |
run "cd #{latest_release} && git show-ref --hash -- refs/heads/master > #{latest_release}/config/HEAD" | |
end | |
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
#!/bin/bash | |
# | |
# Set our bash prompt according to the branch/status of the current git | |
# repository. | |
# | |
# Forked from http://gist.github.com/31934 | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" |
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
ruote-kit ramblings | |
Intro: | |
A rewrite of the existing ruote-rest project that aims to provide an easy to deploy and maintain ruote instance, accessible using a RESTful interface. Should be a breeze to use for non-Ruby projects and developers (apart from Ruby process definitions). | |
Architecture: | |
* Rack based, utilizing rack-mount | |
* Daemon-kit file system layout, keep ruote & co away from local libs, participants, configuration |
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
# Environment | |
export RAILS_ENV=test | |
cp ../database.yml config/ | |
# Re-create | |
mysql -u root -e "DROP DATABASE powerdns_cruise" | |
mysql -u root -e "CREATE DATABASE powerdns_cruise" | |
COMMANDS=( | |
"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
#-- | |
# Copyright (c) 2009, Kenneth Kalmer, [email protected] | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
OlderNewer