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
public class Waffle | |
{ | |
public static void main(String[] args) { | |
λ(); | |
} | |
public static void λ() { | |
System.out.println("hee hee ;-)"); | |
} |
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
<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 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
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 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
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 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
def foo | |
# @cr BITCH-1 brianm should consider using '' instead of "" for performance | |
puts "hello world" | |
end |
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
#!/bin/sh | |
exec foo $0 $@ | |
!# |
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
brianm@kite:~/src/glitch<master>$ ruby src/ruby/glitch.rb src/ruby/glitch.rb | |
-- | |
src/ruby/glitch.rb:10 : one, brianm | |
should this detect string vs io? | |
-- | |
src/ruby/glitch.rb:22 : one, brianm | |
here it takes an IO, good that the name is different | |
from the module function | |
brianm@kite:~/src/glitch<master>$ |
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
HttpExchange exchange = new HttpExchange() { | |
private volatile int count = 0; | |
@Override | |
public InputStream getRequestContentSource() { | |
return new ByteArrayInputStream(new byte[0]); | |
} | |
@Override | |
public Buffer getRequestContentChunk() throws IOException { |
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
import java.util.Map; | |
import java.util.LinkedHashMap; | |
public class Collectiony | |
{ | |
public static <T> Map<T, T> LHMap(T... elements) | |
{ | |
LinkedHashMap<T, T> rs = new LinkedHashMap<T, T>(); | |
for (int i = 0; i < elements.length; i += 2) { | |
rs.put(elements[i], elements[1+1]); |
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
#!/usr/bin/env ruby | |
class Magic | |
def initialize parents=nil, name=nil, args=nil | |
@args, @path = args, if parents then | |
"#{parents}.#{name}" | |
else | |
name |