This file contains hidden or 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
#!/bin/bash | |
temp_dir=$(mktemp -d /tmp/orders.XXXX) | |
pushd $temp_dir | |
for year in $(seq 1994 2014) 2001-clinton 2001-wbush 2009-wbush 2009-obama | |
do | |
echo Downloading $year | |
wget -q "http://www.archives.gov/federal-register/executive-orders/$year.html" | |
done |
This file contains hidden or 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
#!/bin/bash | |
VPN_DEVICE=utun0 | |
VPN_NETWORK=10 | |
DEFAULT_GATEWAY=192.168.1.1 # home | |
host_exceptions=( | |
xxx.xxx.xxx.xxx # Some public service that needs to be accessed from the VPN | |
) |
This file contains hidden or 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 logging | |
import os | |
import re | |
import requests | |
import subprocess | |
import time | |
loggers = {} |
This file contains hidden or 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 ruby | |
HOME = Dir.home | |
OPENSTACK = File.join(HOME, 'development', 'openstack') | |
def openstack | |
session_name = 'openstack' | |
windows = { | |
screen: "cd #{OPENSTACK}; vagrant up && vagrant ssh", | |
vagrant: "cd #{OPENSTACK}; sleep 10 ; vagrant ssh", |
This file contains hidden or 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
@APP.task(base=ErrorHandler) | |
def calc_mrr(): | |
mrr_chord = chord( | |
chain(get_resources.s(key), calc_revenue.s()) | |
for key in mrr_stacks | |
) | |
return mrr_chord(mrr_total.s()) # mrr_total receives a list of AsyncResult | |
# but I need the actual results (the output of calc_revenue, | |
# which is the values returned by _sum_revenues) |
This file contains hidden or 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
[user] | |
name = Anderson Mesquita | |
email = [email protected] | |
[color] | |
ui = true | |
pager = true | |
[alias] | |
ci = commit | |
co = checkout | |
cp = cherry-pick |
This file contains hidden or 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
def no_none(props): | |
''' returns a dict with no None values''' | |
return {key: value | |
for key, value in props.iteritems() | |
if value is not None} | |
def handle_create(self): | |
properties = { | |
self.rs.nodes: self.nodes(), |
This file contains hidden or 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
for i in 1 2 3 4 5 6 7 8 9 0; | |
do | |
echo $RANDOM | |
done |
This file contains hidden or 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 mock | |
from heat.common import exception | |
from heat.common import template_format | |
from heat.engine import resource | |
from heat.engine import scheduler | |
from heat.tests import utils | |
from heat.tests.common import HeatTestCase | |
from ..resources import secret # noqa |
This file contains hidden or 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
var remove_extict = function() { | |
var line = null; | |
var dot = null; | |
var num_extinct = 0; | |
do { | |
try { | |
line = $('[marker-end]'); | |
dot = $('#'+line.id.replace('__line', '__dot')); | |
line.remove(); | |
// dot.remove() |