Skip to content

Instantly share code, notes, and snippets.

Nathan Merritt gnmerritt

Block or report user

Report or block gnmerritt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am gnmerritt on github.
  • I am gnmerritt (https://keybase.io/gnmerritt) on keybase.
  • I have a public key whose fingerprint is 577A 9EA5 05B2 2CAC B367 69C9 B2E7 22BC 4097 CF82

To claim this, I am signing this object:

View onenname
Verifying that +gnmerritt is my blockchain ID. https://onename.com/gnmerritt
@gnmerritt
gnmerritt / Usage.sh
Created Feb 22, 2017
Reflux store dependency parser
View Usage.sh
$ python3 reflux_day_parser.py 'path-to-ui-directory'
@gnmerritt
gnmerritt / newsletter.js
Last active Jan 23, 2018
Bookmarklet to populate Molly's newsletter spreadsheet
View newsletter.js
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bvar%20url%20%3D%20window.location.href%3Bvar%20title%20%3D%20%24('h1').text()%3Bif%20(!title)%20%7Btitle%20%3D%20prompt(%22Please%20enter%20the%20article's%20title%22%2C%20document.title)%3B%7Dvar%20data%20%3D%20%7B'url'%3A%20url.trim()%2C%20'title'%3A%20title.trim()%7D%3B%24.ajax(%7Burl%3A%20%22https%3A%2F%2Fscript.google.com%2Fmacros%2Fs%2FAKfycbxURNIcW6Z4mKVj9hPMi7Lzta4lfwUEz2PyfKJwfveITj3LiCrA%2Fexec%22%2CdataType%3A%20%22jsonp%22%2Cdata%3A%20data%7D).success(function()%20%7B%20alert('Article%20has%20been%20sent%20to%20Hot%20News.%20Thanks!')%3B%20%7D)%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()
@gnmerritt
gnmerritt / op-ed.js
Last active Jan 23, 2018
send op-eds to Molly's newsletter
View op-ed.js
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bvar%20url%20%3D%20window.location.href%3Bvar%20title%20%3D%20%24('h1').text()%3Bif%20(!title)%20%7Btitle%20%3D%20prompt(%22Please%20enter%20the%20article's%20title%22%2C%20document.title)%3B%7Dvar%20author%20%3D%20prompt(%22Please%20enter%20the%20article's%20author%22%2C%20%24('%5Bname%3D%22author%22%5D').attr('content'))%3Bvar%20data%20%3D%20%7B'url'%3A%20url.trim()%2C%20'title'%3A%20title.trim()%2C%20'author'%3A%20author.trim()%7D%3B%24.ajax(%7Burl%3A%20%22https%3A%2F%2Fscript.google.com%2Fmacros%2Fs%2FAKfycbxURNIcW6Z4mKVj9hPMi7Lzta4lfwUEz2PyfKJwfveITj3LiCrA%2Fexec%22%2CdataType%3A%20%22jsonp%22%2Cdata%3A%20data%7D).success(function()%20%7B%20alert('Op-ed%20has%20been%20sent%20to%20Hot%20News.%20Thanks!')%3B%20%7D)%7D)(jQuery.noConflict(true))%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js%22%3Bif(s.addEventListener)%7Bs.addEve
@gnmerritt
gnmerritt / .bash_profile
Last active Sep 7, 2018
multi-line PS1 with git branch, last command status & last command timer
View .bash_profile
# colors with control characters already in place, no need to echo them again when using
# adapted from: https://stackoverflow.com/a/28115284
RESTORE=$(echo -en '\001\033[0m\002')
RED=$(echo -en '\001\033[00;31m\002')
GREEN=$(echo -en '\001\033[00;32m\002')
YELLOW=$(echo -en '\001\033[00;33m\002')
BLUE=$(echo -en '\001\033[00;34m\002')
MAGENTA=$(echo -en '\001\033[00;35m\002')
PURPLE=$(echo -en '\001\033[00;35m\002')
CYAN=$(echo -en '\001\033[00;36m\002')
View gamble.py
import random
import statistics
random.seed("FOOBAR")
def won_round():
return random.choice([True, False])
You can’t perform that action at this time.