View PopulateNuget.groovy
import java.nio.file.Files
import static groovyx.gpars.GParsPool.withPool
def N_PACKAGES = 100
withPool {
(0..<N_PACKAGES).eachParallel { i ->
def dir = new File("package_$i")
dir.deleteDir()
dir.mkdir()
View proxycreds.groovy
@Grab(group='org.apache.httpcomponents', module='httpclient', version='4.5.2')
import org.apache.http.*
import org.apache.http.auth.*
import org.apache.http.client.*
import org.apache.http.client.config.*
import org.apache.http.client.methods.*
import org.apache.http.impl.auth.*
import org.apache.http.impl.client.*
import org.apache.http.util.*
View Proxy.groovy
@Grapes([
@Grab(group='org.eclipse.jetty', module='jetty-server', version='8.1.18.v20150929'),
@Grab(group='org.eclipse.jetty', module='jetty-servlet', version='8.1.18.v20150929'),
@Grab(group='org.eclipse.jetty', module='jetty-servlets', version='8.1.18.v20150929')
])
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.servlet.ServletHandler
import org.eclipse.jetty.servlets.ProxyServlet
View cardodds.groovy
// calculate odds to draw at least one card in target set from a deck
// with n draws
// total size
def deckSize = 52
// cards already consumed
def burned = 0
// number of copies of card we're looking for in the deck
def targets = 4
// number of draws we have
View gist:781e72ecf86b03e296d9
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm
# Rename the file downloaded, just to be nice
# mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
View build.gradle
apply plugin: 'pmd'
pmd {
consoleOutput = true
ruleSets = ['java-basic', 'java-braces', 'java-imports', 'java-design', 'java-typeresolution', 'java-unnecessary']
}
View build.gradle
task showJars << {
configurations.compile.each { println it }
}
View ServletTestCase.groovy
import javax.servlet.ServletOutputStream
import javax.servlet.http.*
trait ServletTestCase {
def parameters = [:]
def requestAttributes = [:]
def sessionAttributes = [:]
def responseContentType
def responseHeaders = [:]
View keybase.md

Keybase proof

I hereby claim:

  • I am ataylor284 on github.
  • I am ataylor284 (https://keybase.io/ataylor284) on keybase.
  • I have a public key whose fingerprint is 981F 1299 904E BC0C EA45 CE4B BC0C 1BE0 5C34 6162

To claim this, I am signing this object:

View build.gradle
apply plugin: 'java'
apply plugin: 'application'
mainClassName = "package.MainClass"
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}