Skip to content

Instantly share code, notes, and snippets.

View eikenb's full-sized avatar
🏠
Working from home

John Eikenberry eikenb

🏠
Working from home
View GitHub Profile
test/ in GOPATH/src
test/main.go
test/foo/bar.go
-- test/main.go --
package main
import "test/foo"
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
"io/ioutil"
@eikenb
eikenb / gist:7220916
Created October 29, 2013 19:21
Simple script to give yourself temporary access to aws security groups.
#!/usr/bin/python
"""
This script will add your current IP to the security group for all ports. It
then waits for a key-press and proceeds to delete the IP from the security
group. This lets you grant yourself access temporarily from home without
leaving your (possibly changing) IP everywhere.
It requires AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
to be set.
@eikenb
eikenb / create-global-clients.sh
Last active December 28, 2015 08:39
script to create/encrypt credentials for dispensing
#!/bin/sh
# Set apid-cli up, copy this file somewhere and edit the CLUSTERS to match your
# apid-cli config file (~/.janrain-capture at the time of writing).
CLUSTERS="test us eu au"
usage() {
[ -n "$1" ] && echo "ERROR: $1\n"
echo "Usage: `basename $0` USERNAME PASSPHRASE"
@eikenb
eikenb / .janrain_config
Created November 14, 2013 23:27
apid-cli config template
defaults :
default_client: test
pretty_print : 'true'
pretty_printer : 'python -mjson.tool'
silent : 'true'
use_curl: true
clusters :
test:
@eikenb
eikenb / gist:8047377
Created December 19, 2013 22:32
logstash 1.1.3->1.2 upgrade notes
https://logstash.jira.com/browse/LOGSTASH-675
# upgrade nodes
http://tobrunet.ch/2013/09/logstash-1-2-0-upgrade-notes-included/
--
https://groups.google.com/forum/#!searchin/logstash-users/schema/logstash-users/byUPJHfpdQA/NdOwuFYxt3EJ
Schema changes from 1.1.13 to 1.2.0 -
### Keybase proof
I hereby claim:
* I am eikenb on github.
* I am eikenb (https://keybase.io/eikenb) on keybase.
* I have a public key whose fingerprint is CCF8 4A96 E07F 8781 98C4 6502 3D9A 9E59 13A9 45A2
To claim this, I am signing this object:
@eikenb
eikenb / helloworld.go
Last active January 15, 2016 18:28
My go to http helloworld app.
package main
// Statically compile with;
// go build -a -tags netgo -installsuffix netgo helloworld.go
import (
"fmt"
"html"
"log"
"net/http"
@eikenb
eikenb / calendars.py
Created June 21, 2017 20:10
0365 calendar example
#!/usr/bin/env python
import subprocess
import time
import O365 as o365
username = 'foo@bar.com'
passwd = 'passwd'
s = o365.Schedule((username, passwd))
@eikenb
eikenb / hipchat-pidgin-notes
Created June 30, 2017 00:39
Setting up pidgin with hipchat.
http://help.hipchat.com/knowledgebase/articles/64439-how-to-connect-using-pidgin
-- Account setup
Open Pidgin (we require v2.7.0 or above)
Go to the "Add Account" window
Protocol: Select "XMPP"
Username: Enter your username from from this page [1]
Domain: "chat.hipchat.com"
Resource: "xmpp"
Password: Your HipChat account password