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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>5A9D4FC6-6CBE-11D9-A21B-000D93589AF6</string> | |
<key>command</key> | |
<string>#!/usr/bin/env ruby -rcgi |
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 parameterize(xml) | |
xml.gsub!('{iterator}', iterator_id.blank? ? 'Start' : 'Continue') | |
xml.gsub!('{iterator_id}', iterator_id || '') | |
xml.gsub!('{from_modified_date}', ((transactions_last_synced_on || 10.years.ago) - 1.day).to_s(:qb_date)) | |
xml.gsub!('{to_modified_date}', (Time.now + 1.day).to_s(:qb_date)) | |
xml | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
require 'fileutils' | |
require 'yaml' | |
# TODO | |
# - pulling a specific UUID/Tag (gitspec hash) with clone/update | |
# - a 'deploy' task (in addition to 'redeploy' ?) | |
# - add merb:gems:refresh to refresh all gems (from specifications) |
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 | |
# 2008.10.03 | |
# JD Huntington | |
# shell script to assist in working with lighthouse and git | |
# requires lighthouse api ruby wrapper from http://github.com/Caged/lighthouse-api/tree/master | |
LIB_DIR='~/lib' # Absolute location of lighthouse.rb and lighthouse-api.rb | |
TOKEN='' # Insert your lighthouse token | |
ACCOUNT='' # Insert your lighthouse account name |
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 | |
# VHostit | |
# Simple bash script to add a virtual host to apache & your hosts file on OS X | |
# | |
# Installation | |
# Throw vhostit.sh somewhere in your path. I like to copy it to /usr/local/bin/vhostit | |
# Usage | |
# `vhostit domain.tld` from within the directory you want to host. | |
# The domain.tld will be added to your hosts file and a VirtualHost added to your apache's httpd.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
f = File.new("myfile.txt", "r") # open a file with read-mode | |
# ... do some stuff with the file, like read its content, ouput it on the screen or whatever | |
# finally: close it! | |
f.close | |
# or: | |
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
<div id="player"> | |
<canvas id="levels" width="145" height="24"></canvas> | |
</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
def any_verb(path, block) | |
get path, &block | |
post path, &block | |
put path, &block | |
delete path, &block | |
head path, &block | |
end | |
any_verb "/" do | |
"foo" |
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
class Pop | |
def initialize(h={}, &block) | |
options(h) | |
puts "indide #{self.class} #{options.inspect}" | |
instance_eval &block if block | |
end | |
def self.default_options(h={}) | |
@default_options ||= h | |
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
######### | |
# Cloud configuration | |
. | |
./test | |
./test/clouds.rb | |
./test/plugins | |
pool :test do | |
cloud :app do | |
instances 2..5 |
OlderNewer