Skip to content

Instantly share code, notes, and snippets.

View notmyname's full-sized avatar

John Dickinson notmyname

View GitHub Profile
@notmyname
notmyname / saio_bringup.sh
Last active October 29, 2019 17:01
py3-only saio setup on ubuntu 18.04 (bionic)
#!/bin/bash
set +e
VBoxManage controlvm saio_vm poweroff
VBoxManage unregistervm saio_vm --delete
rm /home/john/vbox_storage/saio_vm/*
set -e
#!/bin/bash
# turn off video by default
echo "disabling automatic video"
defaults write ~/Library/Preferences/us.zoom.config.plist ZDisableVideo 1
# turn off the zoom web server
echo "turn off the zoom webserver"
lsof -i :19421 | tail -1 | cut -f2 -d' ' | xargs kill -9
@notmyname
notmyname / rst_table.py
Last active June 10, 2019 21:07
rst table printer
#!/usr/bin/env python3.7
# pretty-print columns of text
import sys
def table_print(lines_to_print, padding=3):
"""Given a list of tuples/lists, print a nicely formatted .rst table"""
@notmyname
notmyname / do_we_release.py
Created June 9, 2017 17:39
a tool to find the best day to do a release
from datetime import date
import calendar
my_date = date.today()
today = calendar.day_name[my_date.weekday()]
if today.endswith('y'):
print 'Today is a good day for a release!'
else:
print 'Probably best to wait for a release'
@notmyname
notmyname / local_styles.css
Created December 9, 2016 21:06
make gerrit better
#gerrit_body .gwt-Image {
width: 15px !important;
height: 15px !important;
}
#gerrit_body .changeTable .dataCell a.gwt-InlineHyperlink {
white-space: nowrap !important;
}
@notmyname
notmyname / local_styles.css
Last active November 17, 2016 22:39
make the stars in gerrit smaller
#gerrit_body .gwt-Image {
width: 15px !important;
height: 15px !important;
}
#gerrit_body .changeTable .dataCell a.gwt-InlineHyperlink {
white-space: nowrap !important;
}
What are you working on right now (related to Swift or Swift-ecosystem things)?
Of the things going on that you know about, what's the most important?
What are you excited about in Swift?
What are you worried about in Swift?
@notmyname
notmyname / gist:8552219
Last active January 4, 2016 01:59
Set up OpenStack gate graph on your desktop with GeekTool.
One time only (or whenever you change the graph definition), run build_page.py from
<https://github.com/notmyname/gate_status>. This creates simple_graph_url, a graphite URL to
generate the gate status graph. Then create grab_gate_image.sh somewhere in your $PATH and add
the cronjob. Finally add an image to GeekTool to load /tmp/gate_graph.png and set it to
refresh as often as you run the cronjob. I added the image at 80% opacity.
grab_gate_image.sh
------------------
#!/bin/sh
@notmyname
notmyname / gist:8225201
Created January 2, 2014 19:36
generator example
def foo():
print 'in foo'
yield 'bar'
x = foo()
print 'start'
for i in x:
print i
print 'done'
@notmyname
notmyname / commit-msg
Created December 29, 2013 21:01
A git commit message hook that will process tags and do stuff with them according to a local config file.
#!/usr/bin/env python
#
# An commit-msg hook script that parses commit message tags and does stuff.
#
#
"""
====
Tags