Skip to content

Instantly share code, notes, and snippets.

{
"version":"2.0",
"metadata":{
"apiVersion":"2015-03-31",
"endpointPrefix":"apigateway",
"serviceFullName":"API Gateway",
"signatureVersion":"v4",
"protocol":"rest-json"
},
"documentation":"",
### Keybase proof
I hereby claim:
* I am graham on github.
* I am grahamabbott (https://keybase.io/grahamabbott) on keybase.
* I have a public key whose fingerprint is 0BAA 821A 77E9 E1E5 867A A206 D9C9 DDED 8B57 A99A
To claim this, I am signing this object:
@graham
graham / gist:d67f4959b2dccc2f8637
Created April 29, 2015 19:18
Rebar3 Dependency Issue
===> Compiling eredis
===> erl_opts [debug_info,{d,namespaced_types}]
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: {'EXIT',
{function_clause,
[{filename,join,
[[]],
[{file,"filename.erl"},{line,392}]},
{rebar_erlc_compiler,expand_include_lib_path,
1,
// to generate the number of days since a date
var days = (new Date() - new Date(2014, 7, 11)) / (1000 * 60 * 60 * 24);
var days_whole = Math.floor(days);
// in order to determine what the date is X days from now (we'll use days_whole)
var now = new Date();
var millis_to_date = days_whole * (1000 * 60 * 60 * 24);
var next_date = new Date(now.getTime() + millis_to_date);
@graham
graham / gist:98e47f064b09ee44047a
Last active August 29, 2015 14:11
Deconstruct the oneliner
oneliner = 'output.writerow(map(lambda x: x[1], filter(lambda x: True if x[0] else False, zip(filter_map,line))))'
# First, we zip two lists together, in this case we take something like:
# x = [ {}, {}, {'one':1} ]
# y = [ [one, one, one], [two, two, two], [three, three, three] ]
# and turn it into:
# z = [ ({}, [one, one, one]), ({}, [two, two, two]), ({'one':1}, [three, three, three]) ]
test_list = zip(filter_map, line)