Skip to content

Instantly share code, notes, and snippets.

View johannesboyne's full-sized avatar
👨‍💻
Building.

Johannes Boyne johannesboyne

👨‍💻
Building.
View GitHub Profile
@johannesboyne
johannesboyne / api_gateway.json
Last active January 22, 2016 09:05
apex / API Gateway proposal
{
"functions": {
"defaults": {
"runtime": "node",
"memory": 128
}
},
"gateways": {
"stages": {
"stage1": {
console.log('test')
"operations": [
'CreateApiKey',
'CreateBasePathMapping',
'CreateDeployment',
'CreateDomainName',
'CreateModel',
'CreateResource',
'CreateRestApi',
'CreateStage',
'DeleteApiKey',
@johannesboyne
johannesboyne / Makefile
Last active November 19, 2015 15:44
AWS Lambda Makefile
default: test
test:
npm test
zip:
git archive -o archive.zip HEAD
define GITIGNORE
logs
# Sample 1 - The Codification of our (SOA) Infrastructure
# provider -------------------------------------------------------------------
# Specify the provider and access details
provider "aws" {
access_key = "${var.access_key}" # see variables.tf & terraform.tfvars
secret_key = "${var.secret_key}" # see variables.tf & terraform.tfvars
region = "${var.aws_region}" # see variables.tf & terraform.tfvars
}
remote: .-. .-.
remote: ( | )
remote: .-.: | ;,-.
remote: (_ __`.|.'__ _)
remote: ( .'|`. )
remote: `-'/ | \`-'
remote: ( ! )
remote: `-' `-'\
remote: \
remote: )
curl -v -u <api-token>:api_token \
-X GET "https://toggl.com/reports/api/v2/summary?workspace_id=<ws-id>&since=2015-01-01&until=2015-01-31&user_ids=<user-id>&user_agent=api_call" \
| json -ga "total_grand" | awk '{print ($0/1000/60/60)}'
@johannesboyne
johannesboyne / read_consul_value_written_by_drone.sh
Created December 29, 2014 09:26
read_consul_value_written_by_drone
curl -s -X GET http://127.0.0.1:8500/v1/kv/web/dronestatus|json -ga Value|base64 --decode|json -ga commit.status
curl -s http://127.0.0.1:8500/v1/kv/web/key1|json -ga Value|base64 --decode|xargs -0 sh -c 'piglow "$0"'
<?xml version="1.0" encoding="UTF-8"?>
<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
<gesmes:subject>Reference rates</gesmes:subject>
<gesmes:Sender>
<gesmes:name>European Central Bank</gesmes:name>
</gesmes:Sender>
<Cube>
<Cube time='2014-12-18'>
<Cube currency='USD' rate='1.2285'/>
<Cube currency='JPY' rate='145.96'/>