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 / example.txt
Created November 24, 2015 22:45
example of new reverse listings in swift
Last login: Tue Nov 24 14:41:49 on ttys001
john>europa>~>$ testtoken | pbcopy
john>europa>~>$ curl -i -H "X-Auth-Token: xxx" http://saio:8080/v1/AUTH_test/
HTTP/1.1 204 No Content
Content-Type: text/plain; charset=utf-8
X-Account-Object-Count: 0
X-Timestamp: 1448404927.22093
X-Account-Bytes-Used: 0
X-Account-Container-Count: 0
X-Put-Timestamp: 1448404927.22093
@notmyname
notmyname / gist:5545cde4d726cfa2ce32
Created February 26, 2015 18:42
swift icehouse functests
swift@saio:~/swift$ tox -e func
func develop-inst-nodeps: /home/swift/swift
func runtests: commands[0] | nosetests test/functional
TestAccount
test_account_acls OK 0.43
test_admin_acl OK 0.20
test_bad_metadata OK 0.10
test_bad_metadata2 OK 0.13
test_bad_metadata3 OK 0.10
@notmyname
notmyname / authors.py
Created May 9, 2014 05:39
script to find uncredited authors in swift
# vcs_authors is the output of `git shortlog -nes --no-merges`
import sys
authors = [x.strip() for x in open('/Users/john/Documents/swift/AUTHORS', 'rb').readlines()]
credited_authors = {}
author_by_name = {}
author_by_email = {}
for line in authors:
try: