View cloudtrail-parser.js
#!/usr/bin/env node
const fs = require('fs');
function displayEC2Event(event, type) {
if (event.errorCode) {
// -- errors is when someone is using his fat thumbs
console.log('ERROR: ', event.errorCode, event.errorMessage);
} else {
let items = event.responseElements.instancesSet.items;
View publisher.dot
// example of a dependency graph described using Graphviz dot notation
// see the rendering of graphiviz here - http://imgur.com/a/kiUR2
digraph G {
sales_missing_info
None[label="",shape=point]
open[label="Open"]
sales_missing_info[label="Missing Info.",color=darkgreen,fontcolor=darkgreen]
View convert_yaml_to_json.py
#!/usr/bin/env python
import sys
import yaml
import json
with open(sys.argv[1], 'r') as fd_r:
with open(sys.argv[2], 'w') as fd_w:
json.dump(yaml.load(fd_r), fd_w)
View upload-certificate.sh
#!/bin/sh
cert_name="mycompany"
decrypted_rsa_key=$(mktemp `dirname $0`/${cert_name}-com-server-key-UNENCRYPTED.pem.XXXXXXX)
trap "rm -rf $decrypted_rsa_key" EXIT
openssl rsa -in ${cert_name}-com-server-key.pem -out $decrypted_rsa_key
# The certificate chain must start with the immediate signing certificate,
View bash-container.txt
root@89de118f2aa3:~# ps -ef ; date ; nohup ./zombie & ; sleep 2 ; ps -ef ; sleep 65 ; date ; ps -ef
bash: syntax error near unexpected token `;'
root@89de118f2aa3:~# ps -ef ; date ; (nohup ./zombie &) ; sleep 2 ; ps -ef ; sleep 65 ; date ; ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 16:41 ? 00:00:00 /bin/bash
root 364 1 0 16:47 ? 00:00:00 ps -ef
Wed May 20 16:47:37 UTC 2015
nohup: appending output to 'nohup.out'
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 16:41 ? 00:00:00 /bin/bash
View go-web.go
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Printf(w, "Hello World!")
}
View docker_workshop_microservices_cheat_sheet.md
View Vagrantfile
ENV['VAGRANT_NO_PLUGINS'] = 'true'
Vagrant.configure("2") do |v|
v.vm.box = "yungsang/boot2docker"
v.vm.box_version = ">= 1.3.7"
v.vm.box_check_update = false
v.vm.network :forwarded_port, guest: 5000, host: 60050
v.vm.network :forwarded_port, guest: 8500, host: 60085
v.vm.network :forwarded_port, guest: 8080, host: 60080
View docker_workshop.md

Docker Workshop

  • This workshop is intended for people who are familiar with Linux and running services like a web server, database, etc.

To make it and easier for everyone, and save us some time please prepare a couple of simple things beforehand. Coming unprepared can cause delays and you might miss the whole workshop because the internet is not fast enough for everyone to download the requirements.

  1. Bring your Laptop - this is a workshop!
    It does not matter which operating system you have installed.
View refrigerator.pp
service{"refrigerator":
ensure => running,
}