Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import requests, smtplib, sys, argparse, re
from time import sleep, ctime
from random import random
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from twilio.rest import Client
from requests.exceptions import ConnectionError
@jashsu
jashsu / boggle.py
Last active February 7, 2017 09:49
>>> def findchildren(chain, tail, used):
for move in bogmoves:
newtail = tuple(map(operator.add, tail, move))
if newtail[0] > -1 and newtail[0] < bogsize and\
newtail[1] > -1 and newtail[1] < bogsize and\
newtail not in used:
#sys.stdout.write(">")
#if using isValid() then insert check here
bogchains.append(findchildren(chain + bogboard[newtail[0]][newtail[1]], newtail, used + [newtail]))
#sys.stdout.write("<")
Jasons-MBP:git jasonhsu$ python ~/Downloads/kicknotifier.py xxx@gmail.com xxx@gmail.com xxxxyyyyzzzzaaaa smtp.gmail.com 587 https://www.kickstarter.com/projects/poots/kingdom-death-monster-15?ref=user_menu
Fetching data...
--------------------------------------------------------------------------------
[ 1] $1 : No Reward
[ 2] $5 : By pledging $5, you gain access to our Add Ons. Please incre
[ 3] $50 : Shipping not included. Please see shipping information for d
[ 4] $60 : Shipping not included. Please see shipping information for d
[ 5] $185 : Shipping not included. Please see shipping information for d
[ 6] $195 : Shipping not included. Please see shipping information for d
#!/usr/bin/env python
import requests, json, smtplib, sys
from lxml import etree
from StringIO import StringIO
from time import sleep, ctime
from random import random
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from getpass import getpass
#!/usr/bin/env python
import requests, json, smtplib, sys
from lxml import etree
from StringIO import StringIO
from time import sleep, ctime
from random import random
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from getpass import getpass
@jashsu
jashsu / find_api_urls.py
Last active April 15, 2016 01:33
Monitor availability of limited rewards tiers using only API calls (no scraping!)
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
>>> import requests, json
>>> from lxml import etree
>>> from StringIO import StringIO
>>> from pprint import pprint

Keybase proof

I hereby claim:

  • I am jashsu on github.
  • I am jashsu (https://keybase.io/jashsu) on keybase.
  • I have a public key whose fingerprint is A717 3587 766B 4797 FCD1 5385 B212 DF3B 883D 50F0

To claim this, I am signing this object:

@jashsu
jashsu / gist:45eced901cfc3811e0c2
Created August 12, 2014 23:21
defcon 22 morse
' -.. . ..-. -.-. --- -. ..--- ..---
Sheepy3 byte (@Sheepy3_X - @Sheepy3) / 2 + 1
byte %00000001, 200
byte %00000011, 200
byte %00000111, 200
byte %00001110, 200
byte %00011101, 200
byte %00111010, 200
byte %01110101, 200
byte %11101010, 200
'' =================================================================================================
''
'' File....... dc22_badge_human.spin
''
'' Authors.... Jon "JonnyMac" McPhalen and Ryan "1o57" Clarke
'' MIT License
'' -- see below for terms of use
''
'' E-mail..... jon@jonmcphalen.com
'' 1o57@10000100001.org
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/