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
Code: | |
class RepoControllerTests extends ControllerUnitTestCase { | |
protected void setUp() { | |
super.setUp() | |
} | |
protected void tearDown() { | |
super.tearDown() | |
} |
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
void testShouldFailOnUnexpectedExceptionShouldFail() { | |
shouldFail { | |
shouldFail(MyException) { | |
throw new NullPointerException() | |
} | |
} | |
} |
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
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log -p | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
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
# | |
# refit.conf | |
# Configuration file for the rEFIt boot menu | |
# | |
# Timeout in seconds for the main menu screen. Setting the timeout to 0 | |
# disables automatic booting (i.e., no timeout). | |
# | |
timeout 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
debugLog4j = { | |
... | |
} | |
prodLog4j = { | |
... | |
} | |
development { | |
log4j = debugLog4j |
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
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2') | |
import groovyx.net.http.* | |
import static groovyx.net.http.ContentType.* | |
import static groovyx.net.http.Method.* | |
def http = new HTTPBuilder( 'http://google.com' ) // Takes URL e.g. http://myservice:8087/ | |
http.request( POST, JSON) { req -> | |
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
#!/bin/bash | |
# Get active window attributes | |
ACTIVE_WINDOW=$(xdotool getactivewindow) | |
ACTIVE_GEOMETRY=$(xdotool getwindowgeometry $(xdotool getactivewindow)) | |
ACTIVE_WIDTH=$(echo $ACTIVE_GEOMETRY | cut -d ' ' -f8 | cut -d 'x' -f1) | |
ACTIVE_HEIGHT=$(echo $ACTIVE_GEOMETRY | cut -d ' ' -f8 | cut -d 'x' -f2) | |
# Get screen attributes | |
WIDTH=`xdotool getdisplaygeometry | cut -d' ' -f1` |
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
"Ann Lenczewski (DFL)" <rep.ann.lenczewski@house.mn> | |
"Diane Loeffler (DFL)" <rep.diane.loeffler@house.mn> | |
"Greg Davids (R)" <rep.greg.davids@house.mn> | |
"Sarah Anderson (R)" <rep.sarah.anderson@house.mn> | |
"Tom Anzelc (DFL)" <rep.tom.anzelc@house.mn> | |
"Bob Barrett (R)" <rep.bob.barrett@house.mn> | |
"John Benson (DFL)" <rep.john.benson@house.mn> | |
"Lyndon Carlson Sr. (DFL)" <rep.lyndon.carlson@house.mn> | |
"Jim Davnie (DFL)" <rep.jim.davnie@house.mn> | |
"Steve Drazkowski (R)" <rep.steve.drazkowski@house.mn> |
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
#define PI 3.14159265 | |
#define TWO_PI 6.28318531 | |
int redPin = 5; | |
int greenPin = 3; | |
int bluePin = 6; | |
float hue = 0.0; | |
float saturation = 1.0; | |
float brightness = 1.0; |
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
@Grab(group='joda-time', module='joda-time', version='2.3') | |
import org.joda.time.* | |
import org.joda.time.format.* | |
import java.math.* | |
LocalDate dob = new LocalDate("1950-06-15") | |
println dob | |
Period p1 = new Period(dob, new LocalDate()) | |
Period p2 = new Period(new YearMonth(dob), new YearMonth(new LocalDate())) |