Skip to content

Instantly share code, notes, and snippets.

[{"id":"721340251704667906","status":"Nam nulla integer pede justo lacinia eget tincidunt eget tempus vel","location":{"latitude":-33.03225326781603,"longitude":145.3668145829256},"created_at":"2016-05-06T15:12:15.177+00:00","user":{"id":"2624519736035738987","full_name":"Paula Gordon","username":"paula_gordon","followers":72296,"following":49569}},{"id":"3733661395237030390","status":"In ante vestibulum ante ipsum primis in faucibus orci luctus et ultrices","location":{"latitude":79.41630169285162,"longitude":28.966150279531462},"created_at":"2016-05-06T15:06:22.140+00:00","user":{"id":"3941525609476922650","full_name":"Thomas Riley","username":"thomas_riley","followers":12842,"following":39388}},{"id":"662258247818513206","status":"Hac habitasse platea dictumst morbi vestibulum velit id pretium iaculis diam erat","location":{"latitude":-25.6129643597519,"longitude":-76.50621131071142},"created_at":"2016-05-06T14:53:49.112+00:00","user":{"id":"4137951492018459415","full_name":"Howard Ward","username":"howard

Keybase proof

I hereby claim:

  • I am dnlbyl on github.
  • I am dnlbyl (https://keybase.io/dnlbyl) on keybase.
  • I have a public key whose fingerprint is 5E66 A32D E76D 08D8 4D5C DEBC E098 640D 6AED 3162

To claim this, I am signing this object:

Verifying that +dnlbyl is my blockchain ID. https://onename.com/dnlbyl
@dnlbyl
dnlbyl / setenv.sh
Created April 30, 2014 18:52
Sample setenv.sh file for Tomcat. The catalina.sh file will run this if it is present in the bin dir. This sample configures some JVM settings for a web app with a large heap.
#!/bin/sh
CATALINA_OPTS="-server -Xms256m -Xmx1024m -XX:MaxPermSize=256M -XX:PermSize=128M -XX:+UseParallelGC -Djava.awt.headless=true"
# server: Optimize the JVM for running as a server.
# Xms & Xmx: Min and max Heap size.
# PermSize & MaxPermSize: Min and max PermGen space.
# UseParallelGC: Use threads to perform garbage collection. Allows better GC performance on multi-proc hardware.
# java.awt.headless: Necessary if you use any image manipulation APIs in the awt package.
@dnlbyl
dnlbyl / .gitignore
Created November 19, 2013 14:12
gitignore file for scala/sbt projects
*.class
*.log
# sbt specific
dist/*
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
@dnlbyl
dnlbyl / gist:6684858
Last active December 23, 2015 19:49 — forked from tankchintan/gist:1335220
Install Oracle JDK on an Amazon Linux AMI instance. Includes the unlimited JCE policy files.
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle
wget --no-cookies --header "Cookie: gpw_e24=xxx;" http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u40-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u40-linux-i586.rpm
# Install Java
@dnlbyl
dnlbyl / gist:5505000
Last active December 16, 2015 22:09
Including Apache FOP as a dependency in a grails application causes all sorts of dependency issues. This mess is due to two unrelated issues: 1) Apache FOP has a dependency on Avalon, but uses the wrong group id. For more details, see https://issues.apache.org/jira/browse/FOP-2151 2) The version of xml-apis used by batik is incompatible with the…
compile("org.apache.xmlgraphics:fop:1.1",
"org.apache.xmlgraphics:batik-transcoder:1.7",
"org.apache.xmlgraphics:batik-codec:1.7",
"org.apache.xmlgraphics:batik-awt-util:1.7",
"org.apache.xmlgraphics:batik-bridge:1.7",
"org.apache.xmlgraphics:batik-dom:1.7",
"org.apache.xmlgraphics:batik-gvt:1.7",
"org.apache.xmlgraphics:batik-svg-dom:1.7",
"org.apache.xmlgraphics:batik-svggen:1.7",
"org.apache.xmlgraphics:batik-util:1.7",
@dnlbyl
dnlbyl / max_occurrences.groovy
Created January 30, 2013 00:07
Given a list of strings, find the item with the most occurrences.
def l = ['q','q','s','r','r','t','q']
def m = [:]
l.each { m[it] = m.get(it,0)+1 } // if the item doesn't already exist in the map, 0 is used as a default
assert 'q' == m.max{ it.value }.key // find the item with the largest value
@dnlbyl
dnlbyl / python_SimpleHTTPServer
Created December 5, 2012 21:30
Python Simple HTTP Server
python -m SimpleHTTPServer