Skip to content

Instantly share code, notes, and snippets.

View markusklems's full-sized avatar

Markus Klems markusklems

View GitHub Profile
@ryanray
ryanray / aws-api-gateway-form-to-json.ftl
Created October 4, 2015 01:24
API Gateway application/www-form-urlencoded to application/json based on https://forums.aws.amazon.com/thread.jspa?messageID=673012&tstart=0#673012
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@vicenteg
vicenteg / cluster_info.md.j2
Created October 2, 2014 20:46
how do i access ec2_facts inside a template?
Your Cluster
===
You can access MCS at these addresses:
{% for webserver in groups['webserver'] %}
{%- if 'ansible_ec2_public_hostname' in ec2_facts.ansible_facts -%}
* https://{{hostvars[webserver].ec2_facts.ansible_facts.ansible_ec2_public_hostname}}:8443
{%- else %}
* https://{{hostvars[webserver].ec2_facts.ansible_facts.ansible_ec2_local_ipv4}}:8443
{%- endif %}
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods