Skip to content

Instantly share code, notes, and snippets.

View normalfaults's full-sized avatar
👋

Nirmal Mehta normalfaults

👋
View GitHub Profile
from __future__ import print_function
from pprint import pprint
import time
import math
import datetime
import json
from apiclient.discovery import build

Keybase proof

I hereby claim:

  • I am normalfaults on github.
  • I am nirmal (https://keybase.io/nirmal) on keybase.
  • I have a public key whose fingerprint is A710 2733 9957 35A7 E57D 6DC1 D4B8 CBEB B35D 5D96

To claim this, I am signing this object:

docker ps | awk '{ print $1,$2 }' | awk '{print $1 }' | xargs -I {} docker commit -p {} {$2}_container-backup
@normalfaults
normalfaults / function.js
Created December 8, 2015 21:03 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
#Based on : http://manageiq.org/community/install-from-source/
#Launch a CentOS AMI from AWS (ami-8997afe0), m3.large, 20GB root mount
#Update the VM
yum update -y
yum install -y wget vim telnet git
service iptables stop
#Create User
useradd miqbuilder
#Based on : http://manageiq.org/community/install-from-source/
#Launch a CentOS AMI from AWS (ami-8997afe0), m3.large, 20GB root mount
#Update the VM
yum update -y
yum install -y wget vim telnet git
service iptables stop
#Create User
useradd miqbuilder