Skip to content

Instantly share code, notes, and snippets.

Avatar
🧡

Mat Schaffer matschaffer

🧡
View GitHub Profile
View gist:8168
git clone git://github.com/schapht/corundum.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="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.0.1-SNAPSHOT</version>
</parent>
<groupId>myapps</groupId>
<artifactId>testapp</artifactId>
View gist:14483
mv ~/.profile ~/.profile.old
git clone git://github.com/schapht/profile.git ~/.profile.d
ln -s ~/.profile.d/init ~/.profile
View gridmashup.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<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"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<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 http://www.google.com/ig
// ==/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 = {};
View get_svn_externals.py
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
View TubeClass.java
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
send("#{@helper_type}_helper")
end
def foo_helper