Skip to content

Instantly share code, notes, and snippets.

View lukeredpath's full-sized avatar
🏠
Working from home

Luke Redpath lukeredpath

🏠
Working from home
View GitHub Profile
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
#!/usr/bin/env ruby
require 'fileutils'
if ARGV.empty?
puts "Usage: #{__FILE__} <repository> <repository> ..."
exit -1
end
created_flags = []
// ==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*
<!--
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>
# 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
require 'observable'
class ObservableArray
include Observable
def initialize(array = [])
@array = array
end
protected
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
#!/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'
#!/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" "$@"
#!/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