Skip to content

Instantly share code, notes, and snippets.

mvn -Dtest=MyTest test
mvn -pl specific_project goal
mvn -Dmaven.test.skip=true install
@bigtoast
bigtoast / jrockit ubuntu
Created November 17, 2010 19:28
jrockit ubuntu
path to jrockit /usr/lib/jvm/java-6-jrmc4
then use
sudo update-java-alternatives -l or -s to select your version of java
sudo update-alternatives --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/java-6-jrmc4/bin/appletviewer 64
sudo update-alternatives --install /usr/bin/apt apt /usr/lib/jvm/java-6-jrmc4/bin/apt 64
sudo update-alternatives --install /usr/bin/extcheck extcheck /usr/lib/jvm/java-6-jrmc4/bin/extcheck 64
sudo update-alternatives --install /usr/bin/idlj idlj /usr/lib/jvm/java-6-jrmc4/bin/idlj 64
sudo update-alternatives --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-6-jrmc4/bin/jarsigner 64
clone with following remote submodules:
git clone git://github.com/stevej/emacs.git .emacs.d --recursive
update repo following remote submodules:
git submodule update --init --recursive
checkout remote branch
git checkout -b local-name origin/remote-name
delete remote branch
@bigtoast
bigtoast / gist:787211
Created January 20, 2011 00:57
Notes on Scala Effective Enum patterns.
sealed abstract class MyEnum
object MyEnum {
def apply(str :String) :MyEnum { // do str conversions }
object Val1 extends MyEnum
object Val2 extends MyEnum
}
we need the abstract class for matching the enum type. It can't be a trait because the compiler gets confused with the apply method in the object.
@bigtoast
bigtoast / grails notes
Created February 24, 2011 00:55
random notes on grails n groovy
v. 1.2.2 plugin dependencies are declared in application.properties
v. 1.3.7 plugin dependencies are declared in BuildConfig.groovy
null safe object navigation obj?.value
condensed ternary operator obj.value ?: "else this"
comparison <=>
call method on all objects in list listofobjs*.method
add items to list lst << "new item"
ranges .. ..<
@bigtoast
bigtoast / gist:842527
Created February 24, 2011 17:43
jquery notes
child selector >
#parent > child
:last selector
#parent > *:last
selects the last child of parent
//Disable 3d acceleration
-Dsun.java2d.pmoffscreen=false
@bigtoast
bigtoast / CompileThrift.scala
Created August 9, 2011 01:22 — forked from mccv/CompileThrift.scala
SBT 0.10 thrift generation plugin
package com.twitter.sbt
import sbt._
import Keys._
import Project.Initialize
import Process._
import scala.collection.JavaConversions._
import java.io.File
object CompileThrift extends Plugin {
> sbt project [project]/[task]
> sbt project core/test
@bigtoast
bigtoast / gist:1150325
Created August 16, 2011 22:12
dates with jodatime datetime
var org_date_created;
var org_date_of_sale;
// zones ( local is for dev environments
local = org.joda.time.DateTimeZone.getDefault();
cenZone = org.joda.time.DateTimeZone.forID('America/Chicago');
// dates from db in central
dc = (new org.joda.time.DateTime( date_created )).withZoneRetainFields(cenZone);
dos = (new org.joda.time.DateTime( date_of_sale )).withZoneRetainFields(cenZone);