Skip to content

Instantly share code, notes, and snippets.

@snekse
snekse / Greetings.java
Created April 21, 2016 20:41
An example of creating custom method implementations on a per enum value basis.
public enum Greetings implements CustomGreeting {
FORMAL("Hello. Pleasure to see you.") {
@Override
public String customGreeting() {
return Babelfish.get("i18n.dothraki.greeting.formal");
}
}, CASUAL("Hey, what's up.") {
@Override
public String customGreeting() {
return Babelfish.get("i18n.dothraki.greeting.casual");
@snekse
snekse / ExportCSV.md
Last active February 15, 2016 20:15
Export data to CSV client side in IE without data URI link

Export data to CSV client side in IE without data URI link

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target name="building">
<echo>
---------------------------------------------------
@snekse
snekse / oracle_jdk_wget
Created April 29, 2013 23:39
Download the Oracle JDK via command line. Makes for an easier install Derived from http://stackoverflow.com/questions/10268583/how-to-automate-download-and-instalation-of-java-jdk-on-linux/13347087#13347087 NOTE: May need --no-check-certificate at the end of this command. TODO: Find a way to automate grabbing the latest patch version #linux #ubu…
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.tar.gz"
dragSpeed = 12 //9
team = ''
me = ''
myCircle = ''
ball = initBall().hide()
stampSize = 100
ballSpeed = 1000
playerSpeed = 1000
meter = 100
@snekse
snekse / Shoot-The-Alien.js
Created April 8, 2015 05:57
Bitsbox App: Shoot the Alien
//Lower number means need to be accurate and is harder
explodeDistance = 50
//Lower number means moves faster and is harder
howFastDoesUFOMove = 450
fill('nightsky')
//You can name a variable whatever you want
bob = stamp('rocket2', 375, 900)
ufo = stamp('ufo2', 37, 120)
shot1 = shotInit()
shot2 = shotInit()
@snekse
snekse / Bitsbox-Sound-Explorer.js
Last active August 29, 2015 14:18
Bitsbox Sound Explorer
//State config
var letterSize = 72
var letterXPadding = 20
var letterYPadding = 2
var soundSize = 48
var backLocation = [575, letterSize]
console.log(c123)
console.log(sounds)