This file contains 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
def foo | |
# @cr BITCH-1 brianm should consider using '' instead of "" for performance | |
puts "hello world" | |
end |
This file contains 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
import org.apache.maven.plugin.AbstractMojo; | |
import org.apache.maven.plugin.MojoExecutionException; | |
import org.apache.maven.plugin.MojoFailureException; | |
/** | |
* @goal art | |
* @phase package | |
*/ | |
public class App extends AbstractMojo | |
{ |
This file contains 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
public void testValidateOne() throws Exception { | |
Properties props = new Properties(); | |
props.setProperty("foo", "-3"); | |
Configamajig cfg = new Configamajig(props); | |
try { | |
cfg.configure(Foo.class); | |
fail("should have raised an exception"); | |
} | |
catch (IllegalStateException e) { |
This file contains 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
<plugin> | |
<groupId>com.atlassian.maven.plugins</groupId> | |
<artifactId>jarjar-maven-plugin</artifactId> | |
<version>0.0.4</version> | |
<configuration> | |
<projectPackage>ning.configamajig.v1</projectPackage> | |
<rules> | |
<rule>cglib:cglib-nodep</rule> | |
<rule>com.google.collections:google-collections</rule> | |
<rule>org.antlr:stringtemplate</rule> |
This file contains 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
public class Waffle | |
{ | |
public static void main(String[] args) { | |
λ(); | |
} | |
public static void λ() { | |
System.out.println("hee hee ;-)"); | |
} |
This file contains 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
public class Waffle | |
{ | |
public static void main(String[] args) { | |
$(); | |
} | |
public static void $() { | |
System.out.println("no way!"); | |
} |
This file contains 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
public void testUsefulArgumentOutputForDebug() throws Exception { | |
try { | |
h.createStatement("insert into something (id, name) values (:id, :name)") | |
.bind("name", "brian") | |
.bind(7, 8) | |
.bindFromMap(new HandyMapThing().add("one", "two")) | |
.bindFromProperties(new Object()) | |
.execute(); | |
} | |
catch (StatementException e) { |
This file contains 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
let fib n = | |
let phi = (1 + sqrt 5)/2 in | |
floor (((phi^n) - ((1-phi)^n)) / (sqrt 5)) |
This file contains 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
open Printf | |
let i = int_of_string Sys.argv.(1);; | |
let a = ref 0 in | |
for j = 1 to i do | |
a := (!a + j) | |
done; | |
printf "%i\n" !a;; |
This file contains 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
import org.skife.jdbi.v2.tweak.Argument; | |
import org.skife.jdbi.v2.StatementContext; | |
import java.sql.PreparedStatement; | |
import java.sql.SQLException; | |
import oracle.sql.ArrayDescriptor; | |
import oracle.sql.ARRAY; | |
/** |