Skip to content

Instantly share code, notes, and snippets.

Avatar

John Dickinson notmyname

View GitHub Profile
@notmyname
notmyname / saio_bringup.sh
Last active Oct 29, 2019
py3-only saio setup on ubuntu 18.04 (bionic)
View saio_bringup.sh
#!/bin/bash
set +e
VBoxManage controlvm saio_vm poweroff
VBoxManage unregistervm saio_vm --delete
rm /home/john/vbox_storage/saio_vm/*
set -e
View zoom_protect.sh
#!/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 Jun 10, 2019
rst table printer
View rst_table.py
#!/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 Jun 9, 2017
a tool to find the best day to do a release
View do_we_release.py
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'
View local_styles.css
#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 Nov 17, 2016
make the stars in gerrit smaller
View local_styles.css
#gerrit_body .gwt-Image {
width: 15px !important;
height: 15px !important;
}
#gerrit_body .changeTable .dataCell a.gwt-InlineHyperlink {
white-space: nowrap !important;
}
View questions about swift
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 Nov 24, 2015
example of new reverse listings in swift
View example.txt
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
View gist:5545cde4d726cfa2ce32
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
script to find uncredited authors in swift
View authors.py
# 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: