I hereby claim:
- I am davehughes on github.
- I am davehughes (https://keybase.io/davehughes) on keybase.
- I have a public key whose fingerprint is ACA8 38CA 6494 27D9 0859 0D74 ABAE 7E21 DF42 3F9B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import itertools | |
| DIMENSIONS = { | |
| 'city': [ | |
| 'sf', 'nyc', 'la', 'chicago', | |
| ], | |
| 'color': [ | |
| 'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet', | |
| ], |
| import datetime | |
| import os | |
| import StringIO | |
| import tarfile | |
| import boto | |
| MOUNT_LOCATION = '/Volumes/BOSS_RC-300' | |
| UPLOAD_REGION = '<your-region-here>' |
| # alias:northwind | |
| db1.example.com:5432:northwind:postgres:hunter2 | |
| # alias:mainframe | |
| db1.example.com:5432:mainframe:dave:password123 | |
| db1.example.com:5432:unaliased:postgres: |
| Adjusts formatting of full-width pages to make them easier to read. As an example, try it on https://isocpp.org/files/papers/p0225r0.html. |
| ''' | |
| See http://docs.mitmproxy.org/en/stable/scripting/inlinescripts.html for | |
| further documentation. | |
| Sample workflow: | |
| # In one shell: | |
| > mitmdump --port 8888 -w mitm.out | |
| # In another: |
| from __future__ import print_function | |
| import random | |
| import string | |
| import sys | |
| def generate_board(width=10, height=10): | |
| return { | |
| 'width': width, |
Stop fumbling for your phone every time you need to log in to a site with multi-factor authentication. Just run mfa token <profile> | pbcopy and paste the verification code.
(You do need to be able to grab the TOTP key for the site you're logging into, which is usually available somewhere near the QR code when setting up MFA).
oathtool for your platform.
| nginx: | |
| pkg.installed: [] | |
| service.running: | |
| - reload: true | |
| # SSL setup via letsencrypt, based on the following article: | |
| # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 | |
| letsencrypt: | |
| pkg.installed: [] |
| ''' | |
| Based on https://gist.github.com/DonnchaC/d6428881f451097f329e, including | |
| a very helpful comment attached to that gist. | |
| ''' | |
| import base64 | |
| import hashlib | |
| import os | |
| from Crypto.PublicKey import RSA |