I hereby claim:
- I am jthoenes on github.
- I am jthoenes (https://keybase.io/jthoenes) on keybase.
- I have a public key ASBIR_vSjbR9LDgTFLo0QjlYNRCeUTfOXANacPlKejf5ogo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="EC2") | select(.region=="eu-central-1") | .ip_prefix' | xargs -I {} ipcalc -nb {} | awk 'BEGIN {RS="";FS="\n"}{print $1, $2}' | awk '{print "route", $2, $4, "vpn_gateway"}' |
// http://www.highcharts.com/docs/export-module/render-charts-serverside | |
'use strict'; | |
var PdfPrinter = require('pdfmake'), | |
printer, | |
moment = require('moment-timezone'), | |
path = require('path'), | |
fs = require('fs'); | |
function resolvePath(relative) { |
var storeImageLocally = function(imageFile, callback){ | |
// result of asynchronous call which will store the file | |
var result = { | |
localUrl: 'filesystem:http://localhost:9000/persistent/someImage.jpg', | |
imageId: 'generated uid' | |
} | |
// call the callback with html to insert into redactor | |
callback('<img src="'+result.localUrl+'" data-image-id="'result.imageId'">'); | |
} |
View this code at http://livecoding.io/3973166
View this code at http://livecoding.io/3777704
group :test do | |
gem 'cucumber' | |
gem 'capybara' | |
gem 'poltergeist' | |
gem 'rspec' | |
end |
package net.jthoenes.blog.spike.lambda; | |
import java.util.Arrays; | |
import java.util.List; | |
public class LambdaIntro { | |
public static interface ItemWithIndexVisitor<E> { | |
public void visit(E item, int index); |
finally { | |
try { | |
if (resultSet != null) { | |
resultSet.close(); | |
} | |
} catch (SQLException ex) { | |
logger.error("Error in Database", ex); | |
} finally { | |
try { |
public static <l> L[] createHeapPollution(L... args) { | |
Object[] elements = args; | |
elements[0] = Arrays.asList(12, 12); | |
return args; | |
} | |
public static void main(String... args) { | |
List<string>[] polluted = createHeapPollution(Arrays.asList("a", "b", "c")); | |
// java.lang.Integer cannot be cast to java.lang.String |