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
require 'term/ansicolor' | |
RELEASE_OUTPUT_PATH = File.expand_path("~/Projects/releases/Squeemote") | |
TARGET_NAME = "Squeemote" | |
CONFIGURATION = ENV['CONFIGURATION'] || "Distribution" | |
SDK_VERSION = ENV['SDK'] || 'iphoneos2.2' | |
module Colorize | |
class << self | |
include Term::ANSIColor |
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 | |
require 'fileutils' | |
if ARGV.empty? | |
puts "Usage: #{__FILE__} <repository> <repository> ..." | |
exit -1 | |
end | |
created_flags = [] |
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
// ==UserScript== | |
// Version: 1.0 | |
// @name Co-op OFX Download Link | |
// @description Download co-op internet banking statements in OFX format. | |
// @namespace http://userscripts.org/scripts/show/6976 | |
// @include https://welcome22.smile.co.uk/SmileWeb/getDomesticStatementPage.do* | |
// @include https://welcome22.smile.co.uk/SmileWeb/paginateDomesticStatement.do* | |
// @include https://welcome23.smile.co.uk/SmileWeb/getDomesticStatementPage.do* | |
// @include https://welcome23.smile.co.uk/SmileWeb/paginateDomesticStatement.do* | |
// @include https://welcome26.co-operativebank.co.uk/CBIBSWeb/domesticRecentItems* |
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
<!-- | |
Example: monitor a folder for new torrents and move them elsewhere | |
(e.g. I move them to a network drive that is monitored by | |
Transmission on my media centre. | |
--> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> |
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
# a slightly modified version of multi-parameter attribute support | |
# extracted from ActiveRecord::Base for use with non-ActiveRecord classes | |
module MultiParameterSupport | |
def assign_multiparameter_attributes(pairs) | |
extract_callstack_for_multiparameter_attributes(pairs).each do |name, values| | |
send("#{name}_with_multiparameter_assignment=", *values) | |
end | |
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
require 'observable' | |
class ObservableArray | |
include Observable | |
def initialize(array = []) | |
@array = array | |
end | |
protected |
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
require "active_record" | |
ActiveRecord::Base.establish_connection( | |
:adapter => "sqlite3", | |
:dbfile => "test.sqlite3" | |
) | |
ActiveRecord::Schema.define do | |
create_table "things" do |t| | |
t.column "flag", :bool |
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 | |
require 'fileutils' | |
def fail!(msg = "Failure!") | |
puts(msg) | |
exit(1) | |
end | |
REPOSITORY_URL = 'git://github.com/mxcl/homebrew.git' | |
PACKAGE_URL = 'http://github.com/mxcl/homebrew/tarball/masterbrew' |
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/sh | |
export GEM_PATH = /Users/luke/.rvm/gems/ruby/1.8.7:$GEM_PATH | |
exec "/Users/luke/.rvm/ruby-1.8.7-p174/bin/ruby" "$@" |
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 | |
require 'uri' | |
def isgd(url) | |
`curl http://is.gd/api.php?longurl=#{URI.encode(url)}` | |
end | |
def pbcopy(string) | |
`echo #{string} | pbcopy` | |
return string |