This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> sbt project [project]/[task] | |
> sbt project core/test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Disable 3d acceleration | |
-Dsun.java2d.pmoffscreen=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
child selector > | |
#parent > child | |
:last selector | |
#parent > *:last | |
selects the last child of parent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. ..< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn -Dtest=MyTest test | |
mvn -pl specific_project goal | |
mvn -Dmaven.test.skip=true install |
NewerOlder