This file contains hidden or 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 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 | |
This file contains hidden or 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
# 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 |
This file contains hidden or 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 | |
if test $# -lt 1 | |
then | |
echo "Usage: $0 LOCKDIR cmd" | |
echo "Example: $0 /var/lock/my_process" | |
exit | |
fi | |
This file contains hidden or 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
# 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> |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
<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> |
This file contains hidden or 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
# 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 \ |
This file contains hidden or 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 | |
# Translates using the rtranslate gem | |
$:.unshift(File::join(File::dirname(File::dirname(__FILE__)), "lib")) | |
require 'rtranslate' | |
require 'optparse' | |
options = {} | |
opts = OptionParser.new do |opts| |
This file contains hidden or 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 | |
# organize_folder_by_date.rb | |
# by Nate Murray 2008. [email protected] | |
# | |
# == 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. |
This file contains hidden or 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
# what does this return? or why i love ruby | |
def x | |
5 | |
end | |
if false | |
x = 3 | |
end | |
puts x # => ? |