Skip to content

Instantly share code, notes, and snippets.

View grahamc's full-sized avatar
❄️

Graham Christensen grahamc

❄️
View GitHub Profile
@grahamc
grahamc / command_run_failed_log.log
Last active January 29, 2017 14:43 — forked from hyphon81/command_run_failed_log.log
I would like to use "sudo" in the systemd service. However I couldn't.
2017-01-29 22:46:29.208 1863 DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c execute /nix/store/gqs7kinmfnx5pznj20swm1l3g0gbxysv-python2.7-oslo.concurrency-3.14.0/lib/python2.7/site-packages/oslo_concurrency/processutils.py:344
2017-01-29 22:46:29.214 1863 DEBUG oslo_concurrency.processutils [-] u'sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c' failed. Retrying. execute /nix/store/gqs7kinmfnx5pznj20swm1l3g0gbxysv-python2.7-oslo.concurrency-3.14.0/lib/python2.7/site-packages/oslo_concurrency/processutils.py:426
----
2017-01-29 22:46:30.713 1863 DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c execute /nix/store/gqs7kinmfnx5pznj20swm1l3g0gbxysv-python2.7-oslo.concurrency-3.14.0/lib/python2.7/site-packages/oslo_concurrency/processutils.py:344
2017-01-29 22:46:30.718 1863 DEBUG oslo_concurrency.processutils [-] u'sudo nova-rootwrap /etc/nova/root
#!/bin/sh
set -e
set -u
readonly MACHINE=dev
if ! docker-machine status $MACHINE > /dev/null 2> /dev/null; then
# The machine doesn't exist
docker-machine create \
@grahamc
grahamc / Makefile
Last active September 30, 2015 23:19
AWS Instance Age Report (run `make`)
fresh: clean chart
chart: instance_ages
@echo "AWS EC2 Instance Age Report"
@echo "---------------------------"
@echo "Days\\tCount"
@cat instance_ages | ./chart.py -n
clean:
rm -f instance*
#!/bin/bash
set -e
vagrant ssh -c "bundle install"
vagrant ssh -c "rake db:test:prepare"
vagrant ssh -c "rspec spec/"
vagrant ssh -c "cucumber features/"
exit 0

Keybase proof

I hereby claim:

  • I am grahamc on github.
  • I am graham (https://keybase.io/graham) on keybase.
  • I have the public key with fingerprint BA94 FDF1 1DA4 0521 2864  C121 FE91 8C3A 98C1 030F

To claim this, I am signing this object:

@grahamc
grahamc / server.sh
Created February 12, 2014 15:56 — forked from warmwaffles/server.sh
#!/bin/bash
${1:=8000}
python -m SimpleHTTPServer "$@"
@grahamc
grahamc / agency-codes.json
Last active August 7, 2019 11:35
Federal Reporting Agency Codes as a Service
{
"1200": "Department of Agriculture",
"1201": "Office of the Secretary of Agriculture",
"1203": "USDA, Office of the General Counsel",
"1204": "Office of the Inspector General",
"1205": "USDA, Office of the Chief Financial Officer",
"1208": "USDA, Office of Communications",
"1215": "USDA, Office of Operations",
"1260": "Commodity Credit Corporation",
"1261": "Rural Telephone Bank",
@grahamc
grahamc / background.py
Created January 8, 2013 15:26
Set your background photo from @apod on Twitter. Requires: - mechanize - appscript
#!/usr/bin/env python
import mechanize
from appscript import app, mactypes, its
from datetime import date
d = date.today()
br = mechanize.Browser()
url = 'http://apod.nasa.gov/apod/ap%s.html' % d.strftime("%y%m%d")
@grahamc
grahamc / tmp.sh
Created January 1, 2013 02:53 — forked from anonymous/tmp.sh
#!/bin/bash
bottle=12.5
empty=0.95
s=6.95
i=1
tabspace=" "
defmax=5
if [ -z $1 ]; then
max=$defmax
#!/bin/bash
foobar --your test
TESTSTAT=$?
tar -cf logs/ logs.tar
exit $TESTSTAT