Skip to content

Instantly share code, notes, and snippets.

View bjmc's full-sized avatar

Brendan McCollam bjmc

View GitHub Profile
@bjmc
bjmc / -
Created November 26, 2014 17:52
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://extras.ubuntu.com/ubuntu/ utopic/main i386 Packages
release v=14.10,o=LP-PPA-app-review-board,a=utopic,n=utopic,l=Application Review Board PPA,c=main
origin extras.ubuntu.com
500 http://extras.ubuntu.com/ubuntu/ utopic/main amd64 Packages
release v=14.10,o=LP-PPA-app-review-board,a=utopic,n=utopic,l=Application Review Board PPA,c=main
origin extras.ubuntu.com
500 http://archive.canonical.com/ubuntu/ utopic/partner Translation-en
sudo cp migrate_to_sql.py /mnt/globus_deploy/apps/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/admin/migrate_to_sql.py
from globusonline.graph.admin.migrate_to_sql import clear_sql_db, initialize_sql_db, migrate_to_sql
from globusonline.graph.sql import SQLManager, Base
sql_manager = SQLManager()
clear_sql_db(sql_manager.engine(), Base)
initialize_sql_db(sql_manager.engine(), Base)
@bjmc
bjmc / gist:2c0305c2b7d1c2cd53d194187b3ddf26
Created April 28, 2016 14:39
HTTPS reverse proxy /etc/nginx/sites-enabled/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
Client Name,Grant bundle name,Grant_type,Response_type,Client id
0977cdc8_13c0_11e6_a762_22000bf2d559_e_globus_org,,"(u'authorization_code', u'refresh_token', u'urn:globus:auth:grant_type:dependent_token')","(u'code',)",7ed42fb4-1ba2-11e6-9483-57d6b4b116c1
2bedea30-aaed-4994-9b96-6c41ce12be05,confidential_client,"(u'authorization_code', u'client_credentials', u'refresh_token')","(u'code',)",cdbbb45f-123b-4fcf-bc2a-b310b304ad47
5e1cd8a7-b8d5-434e-ba0a-ecc0f9890db7,confidential_client,"(u'authorization_code', u'client_credentials', u'refresh_token')","(u'code',)",5cfc2f6a-0755-41a3-a836-db06fe90a060
5ef475e7-942e-4ad3-871f-219fb38b1f95,,"(u'authorization_code', u'refresh_token', u'urn:globus:auth:grant_type:dependent_token')","(u'code',)",fffba431-37ac-4546-85bb-9185f347dc72
866cf534_2111_11e6_bfe4_22000b1701d1_e_globus_org,,"(u'authorization_code', u'refresh_token', u'urn:globus:auth:grant_type:dependent_token')","(u'code',)",71c0176b-ed2a-4bb6-a7fd-7ac2b4757d60
9343be8d-c88e-459e-8227-ba109277daa9,,"(u'author
@bjmc
bjmc / hangman.py
Created January 26, 2018 09:30
Learning Python: A simple hangman game
import random
# List of words
some_words = [
'aloof',
'radiate',
'apathetic',
'inestimable',
'coil',
@bjmc
bjmc / kingrow_reset.txt
Last active March 28, 2020 01:30
Factory reset procedure for Kingrow K1
Trigger factory reset for Kingrow K1:
0) You'll need 'adb' and 'fastboot' installed. Use Google, or here's a guide:
https://www.androidpit.com/how-to-install-adb-and-fastboot
1) First, get to a state where adb recognizes the device...
1a) Press and hold Volume-Up + Power to get to a screen that says "Software update please wait patiently".
1b) I'm not sure exactly what the trick is from here (please add info if anyone knows), but