Skip to content

Instantly share code, notes, and snippets.

View joesondow's full-sized avatar

Joe Sondow joesondow

View GitHub Profile
@joesondow
joesondow / asgard.log
Created June 26, 2012 05:10
Asgard startup log
[2012-06-25 22:01:20,235] [pool-2-thread-1] com.netflix.asgard.ConfigService Initializing...
[2012-06-25 22:01:20,506] [pool-2-thread-1] com.netflix.asgard.InitService Initializing...
[2012-06-25 22:01:20,517] [pool-2-thread-1] com.netflix.asgard.RegionService Initializing...
[2012-06-25 22:01:21,938] [pool-2-thread-1] com.netflix.asgard.MonkeyPatcherService Initializing...
[2012-06-25 22:01:57,632] [http-bio-8080-exec-1] grails.app.filters.TrackingFilters 2012-06-25T22:01:57.573-07:00 Session started. Client localhost, User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
[2012-06-25 22:01:57,979] [http-bio-8080-exec-2] grails.app.filters.TrackingFilters 2012-06-25T22:01:57.979-07:00 Session started. Client localhost, User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
[2012-06-25 22:01:58,372] [http-bio-8080-exec-8] com.netflix.asgard.Email
// ASG and ELB mismatched zones
asgardLocator.getInstance('nactest').acrossRegions {
def asgs = autoScaling
def elbs = loadBalancer
html.output << "<h3>${inRegion}</h3>"
def elbByName = elbs.inject([:]) { acc, elb ->
acc[elb.loadBalancerName] = elb
acc
}
@joesondow
joesondow / FrontEndAppOwnerEmails.groovy
Created November 5, 2012 17:25
Asgard console cases
// App owners with ELBs
Set frontEndAppEmails = new TreeSet()
['nactest', 'nacprod'].each { String env ->
asgardLocator.getInstance(env).acrossRegions {
def elbs = loadBalancer
def apps = application
def pattern = ~/([a-zA-Z0-9._]*).*?/
def frontEndAppNames = elbs.findResults {
@joesondow
joesondow / gist:4979621
Created February 18, 2013 18:47
Which security groups have a lot of IP permission rules?
// Which security groups have a lot of IP permission rules?
['nactest', 'nacprod'].each {
asgardLocator.getInstance(it).acrossRegions {
def allSecurityGroups = security.securityGroups
allSecurityGroups.sort { it.ipPermissions.size() }
html.output << "<h3>${it}</h3>"
Map counts = new HashMap()
allSecurityGroups.each { sg ->
if (sg.ipPermissions.size() > 10) {
html.with { output << "SG ${sg.groupId} ${sg.groupName} ${sg.ipPermissions.size()} </br>" }
@joesondow
joesondow / SecurityGroupsWithManyPermissions.groovy
Created February 18, 2013 19:36
Which security groups have a lot of IP permission rules?
// Which security groups have a lot of IP permission rules?
['nactest', 'nacprod'].each {
asgardLocator.getInstance(it).acrossRegions {
def allSecurityGroups = security.securityGroups
allSecurityGroups.sort { it.ipPermissions.size() }
html.output << "<h3>${it}</h3>"
Map counts = new HashMap()
allSecurityGroups.each { sg ->
if (sg.ipPermissions.size() > 10) {
html.with { output << "SG ${sg.groupId} ${sg.groupName} ${sg.ipPermissions.size()} </br>" }

Keybase proof

I hereby claim:

  • I am JoeSondow on github.
  • I am joesondow (https://keybase.io/joesondow) on keybase.
  • I have a public key whose fingerprint is 6FA3 B117 56AB 1419 813E 03A1 8498 41E1 9D11 C769

To claim this, I am signing this object:

// ==UserScript==
// @name People You Follow
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Put the "People you follow" link back on the Twitter notifications page of a Verified user
// @author @JoeSondow
// @match https://twitter.com/i/notifications*
// @grant none
// ==/UserScript==
@joesondow
joesondow / happy_git_on_osx.md
Last active November 21, 2016 10:10 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@joesondow
joesondow / happy_ruby_on_osx.md
Last active December 28, 2016 01:56
Creating a Happy Ruby Environment on OS X
#!/bin/bash

source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='[\u@mbp \w$(__git_ps1)]\$ '

alias ll='ls -al'

Load rbenv automatically by appending