Skip to content

Instantly share code, notes, and snippets.

Avatar
🧡

Mat Schaffer matschaffer

🧡
View GitHub Profile
View pomstuff.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.cimians.code.corundum</groupId>
<artifactId>parent</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<groupId>myapps</groupId>
<artifactId>testapp</artifactId>
View dependency.xml
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.6-beta-2</version>
<scope>test</scope>
</dependency>
View plugin.xml
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-3</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
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/TextMate.app/Contents/MacOS/TextMate
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
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
seasons.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"
end
def service(name, type = "Portal")
View setgetters.js
MyClass = function() {
this.foo = "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
</VirtualHost>
# 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