Skip to content

Instantly share code, notes, and snippets.

View mckaydavis's full-sized avatar

McKay Davis mckaydavis

View GitHub Profile
WEAK51 PAAQ 231212
TSUAK1
BULLETIN
Public Tsunami Message Number 5
NWS National Tsunami Warning Center Palmer AK
312 AM AKST Tue Jan 23 2018
UPDATES

Keybase proof

I hereby claim:

  • I am mckaydavis on github.
  • I am mckaydavis (https://keybase.io/mckaydavis) on keybase.
  • I have a public key whose fingerprint is 068B C60C 682A D53F EAD5 8128 C503 C4B6 E888 B68E

To claim this, I am signing this object:

@mckaydavis
mckaydavis / browserDownload.js
Last active September 14, 2015 19:25
Start browser download of 'data' (or text) as the specified filename and mime type
// McKay Davis / 2015
// triggerBrowserDownloadOfDataAsFilename(data, filename = 'download', mimetype = 'text/plain')
//
// Start browser download of 'data' as the specified filename and mime type
// if 'data' is already a dataURL, it will not be encoded and 'mimetype' will be ignored
// if not specified, 'filename' will default to 'download'
// if not specified, 'mimetype' will default to 'text/plain'
//
// example:
// triggerBrowserDownloadOfDataAsFilename('Hello World!\n', 'hello.txt');
@mckaydavis
mckaydavis / log_exec.py
Created June 23, 2014 21:50
Python non-blocking reading from stdout and stderr of subprocess.popen process using os.pipe and select.select
#!/usr/bin/env python
# File: log_exec.py
# Author: McKay Davis
# Date: Jun 23, 2014
# Non-blocking stdout and stderr read from a
# Popen process
import os
import subprocess
@mckaydavis
mckaydavis / dockshell
Created June 22, 2014 18:34
One-liner to start bash shell in most recently modified docker container image
docker run -i -t $(docker images | head -2 | tail -1 | tr -s \ | cut -d\ -f3) /bin/bash