Skip to content

Instantly share code, notes, and snippets.

ipedrazas /
Created May 11, 2019 — forked from kevin-smets/
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry


Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!


ipedrazas /
Created Mar 16, 2018 — forked from marcusdb/
push node_exporter metrics to push gateway
curl -s http://localhost:9100/metrics | curl --data-binary @-
View gist:2267ed44e1d53c9b592452e801659fcf

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
ipedrazas /
Created Nov 14, 2016 — forked from ccampanale/
Bash shell script to check seal status for local vault server and attempt to unseal using keys secured in vault secret store. Supports HA Vault clusters with TLS with unseal keys stored as secrets in vault (see code). Relies on registered service vault.service.consul, in place DNS configuration, and a single unsealed vault instance in your clust…
export vault=/usr/local/bin/vault
export VAULT_TOKEN=$(cat /root/.vault-token)
local_vault="-address=https://$(hostname -f):8200"
unsealed_vault="-address=https://$(getent hosts $(dig +short vault.service.consul | tail -n 1) | awk '{ print $2 }'):8200"
leader_vault="-address=https://$($vault status $vault_cacert $unsealed_vault 2> /dev/null | grep Leader | awk '{ print $2 }' | sed 's/^http\(\|s\):\/\///g'):8200"
vault_read="$vault read $vault_cacert $leader_vault"
vault_unseal="$vault unseal $vault_cacert $local_vault"
ipedrazas / System
Created Apr 19, 2016 — forked from vasanthk/System
System Design Cheatsheet
View System

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
ipedrazas / pod1.yml
Created Nov 10, 2015 — forked from resouer/pod1.yml
How to implement volumes-from in Kubernetes Pod?
View pod1.yml
apiVersion: v1
kind: Pod
name: server
- image: resouer/sample:v2
name: war
ipedrazas / gist:ecf41f4202d4d73ac651
Created Oct 15, 2015 — forked from agonzalezro/gist:e2335feac23cdb377810
Base64 `dockercfg` for pulling images from private repos into Kubernetes
View gist:ecf41f4202d4d73ac651
cat $HOME/.docker/config.json|jq '.auths'|sed "s/http:/https:/g"|tr '\n' ' '|tr -d '[[:space:]]'|base64
ipedrazas /
Created Sep 26, 2015 — forked from hbpasti/
fontawesome with i3status

fontawesome with i3status

This is my i3 config, using FontAwesome icons for i3status.

Save files to ~/.i3.

View lambda_cloudsearch.js
console.log('Loading event');
var async = require('async');
var jpath = require('json-path')
var zlib = require('zlib');
var aws = require('aws-sdk');
var s3 = new aws.S3({
apiVersion: '2006-03-01'