Skip to content

Instantly share code, notes, and snippets.


Mat Schaffer matschaffer

View GitHub Profile
View gist:8168
git clone git://
cd corundum/
mvn clean install
cd testapp/
mvn clean install
java -jar target/testapp-0.0.1-SNAPSHOT-jruby-complete.jar
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
View gist:14483
mv ~/.profile ~/.profile.old
git clone git:// ~/.profile.d
ln -s ~/.profile.d/init ~/.profile
View gridmashup.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/grid.css"/>
<script type="text/javascript" src="__SERVER_URL__/js/toolkit/yui.js"></script>
<script type="text/javascript" src="__SERVER_URL__/js/toolkit/toolkit.js"></script>
<script type="text/javascript" src="__SERVER_URL__/js/toolkit/connection.js"></script>
<script type="text/javascript" src="__SERVER_URL__/js/toolkit/datasource.js"></script>
<script type="text/javascript" src="__SERVER_URL__/js/toolkit/grid.js"></script>
View remainingtime.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/renderer.css" />
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/grid.css" />
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/editor.css" />
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/toolkit.css" />
<link type="text/css" rel="stylesheet" href="__SERVER_URL__/css/toolkit/toolkit.css" />
View fixigoogle.js
// ==UserScript==
// @name Fix igoogle
// @namespace User
// @include
// ==/UserScript==
document.getElementById('col1').style.display = "None";
document.getElementById('gsea').style.display = "None";
View jsonapi_update.js
RALLY.JsonApi.prototype.capitalize = function(o) {
if (typeof o == "string") {
return o.charAt(0).toUpperCase() + o.substr(1).toLowerCase();
} else {
return o;
RALLY.JsonApi.prototype.capitalizedKeys = function(data) {
var newData = {};
import commands
from string import Template
tmpl = Template("git-svn clone $repo $folder")
def getCommandOutput(command):
status, output = commands.getstatusoutput(command)
if status != 0:
raise RuntimeError, '%s failed w/ exit code %d' % (command, status)
return data
public class TubeClass {
public static boolean methodCalled = false;
public static boolean constructorCalled = false;
public TubeClass() {
constructorCalled = true;
System.err.println("I really wish you wouldn't call me.");
public void dontCallMe() {
View send_example.rb
class AClassThatUsesSend
def action
# here's where the action happens
@helper_type = "foo"
# this is equivalent to self.foo_helper or just foo_helper
def foo_helper