Skip to content

Instantly share code, notes, and snippets.


Mat Schaffer matschaffer

View GitHub Profile
View pomstuff.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
View dependency.xml
View plugin.xml
View Rakefile
require "rubygems"
require "rake"
Dir['tasks/**/*.rake'].each { |rake| load rake }
namespace :objc do
desc "Compiles all Objective-C bundles for testing"
task :compile do
directory 'build'
sh "gcc -o build/RubyTesting.bundle -bundle -framework Foundation test/bridge.m Classes/Models/*.m"
View gist:91877
Process: TextMate [503]
Path: /Applications/
Identifier: com.macromates.textmate
Version: 1.5.8 (1498)
Code Type: X86 (Native)
Parent Process: launchd [155]
Date/Time: 2009-04-08 13:23:37.077 -0400
OS Version: Mac OS X 10.5.6 (9G55)
Report Version: 6
matschaffer / signals_in_screw_unit.js
Created Apr 14, 2009
A example syntax for handling jquery functions in screw-unit
View signals_in_screw_unit.js
signal(me).when(adapter, 'loaded', function() {
expect(adapter.trains.length).to(equal, 5);
View nested_class_associations.rb
class District
has_many :leagues
has_many :seasons, :through => :leagues
# If this doesn't work
has_many :teams, :through => :seasons
# How about this?
def teams
View useradder.rb
require 'java'
Dir['*.jar'].each { |jar| require jar }
require '../liferay-portal-5.2.2/tomcat-6.0.18/webapps/ROOT/WEB-INF/lib/saaj-api.jar'
class Liferay
def initialize(user, pass, host)
@url_base = "http://#{user}:#{pass}@#{host}/tunnel-web/secure/axis"
def service(name, type = "Portal")
View setgetters.js
MyClass = function() { = "foo"
MyClass.prototype = {
set foo(v) {
print("sorry, I don't wanna set foo with " + v);
get foo() {
return "not really foo";
View gist:116262
<VirtualHost *:80>
ServerName proxytest
SSLProxyEngine on
ProxyPass /uis http://hostthat/works
ProxyPass /qcbin https://sslthatdoesntwork/qcbin
ProxyRemote * http://proxyaddress:8080
# Logs show
[Fri May 22 13:42:28 2009] [error] (60)Operation timed out: proxy: HTTPS: attempt to connect to ip_for_sslthatdoesntwork (sslthatdoesntwork) failed