Skip to content

Instantly share code, notes, and snippets.

View hajdbo's full-sized avatar

Boris Hajduk hajdbo

  • @goto Group - Gojek + GoTo Financial
  • Singapore
View GitHub Profile
@hajdbo
hajdbo / gist:9c698a2b379a629e08bf17ce10b4596f
Last active March 31, 2016 17:15 — forked from hummus/gist:8592113
aws cli + jq example
aws ec2 describe-instances --filters "Name=tag-value, Values=widgets" --output text --query 'Reservations[*].Instances[*].[InstanceId,Tags[?Key==`role`].Value[]]'
brew install jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
#!/bin/bash
#####
# Builds a custom nginx
#
# RELEASE_TAGS="+your+tags+here"
# RELEASE_MAINTAINER="Your Name Here"
# RELEASE_MAINTAINER_EMAIL="[email protected]"
# RELEASE_MESSAGE="Some message"
#