This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from boto.ec2.autoscale import AutoScaleConnection | |
def find_unused_launch_configs(): | |
conn = AutoScaleConnection() | |
autoscale_groups = conn.get_all_groups(max_records=100) | |
launch_configs = conn.get_all_launch_configurations(max_records=100) | |
launch_config_names = {lc.name for lc in launch_configs} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a little slow, so we cache it so we're not running a slow | |
# find on every terminal startup: | |
if [[ -e ~/.cache/zsh_exports_gnubin ]]; then | |
gnubins=(${(ps:\n:)"$(cat ~/.cache/zsh_exports_gnubin)"}) | |
else | |
gnubins=(${(ps:\n:)"$(find /usr/local/opt -type d -follow -name gnubin -print | tee ~/.cache/zsh_exports_gnubin)"}) | |
fi | |
for bindir in $gnubins; do | |
export PATH=$bindir:$PATH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- mode: python -*- | |
from subprocess import Popen, PIPE | |
import sys | |
syntax_checker = "pyflakes" | |
def run(command): | |
p = Popen(command.split(), stdout=PIPE, stderr=PIPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Recipe for creating and updating security groups programmatically. | |
""" | |
import collections | |
import boto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- coding: utf-8 -*- | |
;; starcraft.el -- track user APM (actions per minute) while using Emacs | |
;; | |
;; Copyright 2010 by Michael Steder | |
;; Author: Michael Steder (steder@gmail.com) | |
;; Created: 2010 | |
;; Version: 1.0 | |
;; Keywords: Actions per minute | |
;; | |
;; Inspired by a love of Starcraft and someones offhand comment |
OlderNewer