Skip to content

Instantly share code, notes, and snippets.

View jashmenn's full-sized avatar

Nate Murray jashmenn

View GitHub Profile
#
# To use:
# require 'opc/capistrano/ext/upload_config_files'
# upload_config.upload_config_file("config/config.yml", "config/config.yml")
#
module Opc
module Capistrano
module Ext
module UploadConfigFiles
# sudoers file.
# http://gist.github.com/24001
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
#
# Host alias specification
#!/bin/bash
if test $# -lt 1
then
echo "Usage: $0 LOCKDIR cmd"
echo "Example: $0 /var/lock/my_process"
exit
fi
# CatNotifier - CruiseControl Notifier for irc_cat
#
# Put this file in {CruiseControl Path}/builder_plugins/installed/
# Tell the builder, whom do you want to receive build notices
# <pre><code>Project.configure do |project|
# ...
# project.cat_notifier.host = "your.irccat.host"
# project.cat_notifier.port = "yourport"
# ...
# end</code></pre>
# runs ARGV and puts the output
#
# Example:
# ruby poller.rb date
#
# http://gist.github.com/39729
module Screen
def self.clear
print "\e[H\e[2J"
end
<html>
<head>
<!-- help for hekaldama -->
<script type="text/javascript">
function do_it() {
var error_list = document.getElementById("footer");
error_list.appendChild("<li>good job you can do it!</li>");
}
</script>
</head>
# An easy way to test run a cluster of erlang nodes. An idea for skelerl, does
# not currently function.
# The following code would evaluate to running:
#
# erl -pa ./ebin -kernel inet_dist_listen_min 7000 inet_dist_listen_max 7050 \
# -setcookie chordjerl -s chordjerl_srv start -s chordjerl_srv create_ring \
# -sname node0
#
# erl -pa ./ebin -kernel inet_dist_listen_min 7000 inet_dist_listen_max 7050 \
# -setcookie chordjerl -s chordjerl_srv start -s chordjerl_srv state \
#!/usr/bin/env ruby
# Translates using the rtranslate gem
$:.unshift(File::join(File::dirname(File::dirname(__FILE__)), "lib"))
require 'rtranslate'
require 'optparse'
options = {}
opts = OptionParser.new do |opts|
#!/usr/bin/env ruby
# organize_folder_by_date.rb
# by Nate Murray 2008. nate@natemurray.com
#
# == Description
# Organize all files in a given folder by date. This is commonly used to
# organize a "Downloads" folder.
#
# Currently, will only move files more than 24 hours old. This is to protect
# against moving a file as it is downloaded.
# what does this return? or why i love ruby
def x
5
end
if false
x = 3
end
puts x # => ?