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
Are you about to open-source a private repository?
Do you want to squash all history into a single commit before making the code public?
This one-liner takes care of it:
git reset $(git commit-tree HEAD^{tree} -m 'Initial commit')
(https://twitter.com/mathias/status/1045312837671882752?s=09)

Keybase proof

I hereby claim:

  • I am hajdbo on github.
  • I am borishajduk (https://keybase.io/borishajduk) on keybase.
  • I have a public key whose fingerprint is 3910 12D8 9528 2DBA AC3C 3644 7210 C6F2 ACB5 AC77

To claim this, I am signing this object:

@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 (jspenguin@jspenguin.org)
# 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="hi@example.com"
# RELEASE_MESSAGE="Some message"
#