Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
from json import loads
from requests import get
import location
from datetime import date
import time
from console import alert
# Customization here
APItoken = 'Insert your API token here'
View Bullseye.bookmarklet
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";"loadingp";"20px";"#fff";"20px";;"fixed";"9999999";".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src=""+(Math.random());})();
philgruneich /
Created April 12, 2014 16:41
Logs into GLB2 and grabs the HOF source code.
import requests
from bs4 import BeautifulSoup as bs
login = {
'action': 'login',
'user_name':'your username',
'password':'your password'
with requests.Session() as c:
philgruneich /
Created April 13, 2014 00:13
Character Calculator for GLB2
# encoding: utf-8
from functools import reduce
from operator import mul
heights_help = {'56':66, '57':67, '58':68, '59':69, '510':70, '511':71, '60':72, '61':73, '62':74, '63':75, '64':76, '65':77, '66':78, '67':79, '68':80}
traits_help = {'Unpr-edic-table': 'unpredictable', 'Blocking Back': 'hb_blocking_back', 'Solid Frame': 'qb_solid_frame', 'Nerves of Steel': 'nerves_of_steel', 'Speedster': 'wr_speedster', 'Ball Hawk': 'ball_hawk', 'Blitzer': 'lb_blitzer', 'Tactician': 'tactician', 'Dominator': 'wr_control', 'Man Specialist': 'man_specialist', 'Consistent Blocker': 'ol_consistent_blocker', 'Early Bloomer': 'early_bloomer', 'Run Stuffer': 'dl_run_stuffer', 'Technical Blocker': 'ol_tech_blocker', 'Sure Tackler': 'sure_tackler', 'Precision Passer': 'qb_precision_passer', 'Fearsome': 'fearsome', 'Long Reach': 'long_reach', 'Thick Skin': 'thick_skin', 'Coverage LB': 'lb_coverage', 'Quick Feet': 'quick_feet', 'Slippery': 'slippery', 'Shifty': 'wr_shifty', 'Slot Receiver': 'wr_slot_receiver', 'Pass Rusher': 'd
philgruneich /
Last active August 29, 2015 13:59
Calculator module for GLB2
# -*- coding: UTF-8 -*-
from functools import reduce
from operator import mul
class glb2calc:
def __init__(self, position, height, weight, trait1, trait2, trait3, strength=5, speed=5, agility=5, stamina=5, awareness=5, confidence=5):
if stamina + strength + confidence + awareness + agility + speed < 35:
print('You have {0} attribute points left.'.format(35 - (stamina + strength + confidence + awareness + agility + speed)))
elif stamina + strength + confidence + awareness + agility + speed > 35:
philgruneich /
Last active August 29, 2015 14:02
Grab IMDB data to fill a MultiMarkdown table to be sent to Day One
#coding: utf-8
from urllib import quote
import json
import re
import sys
import webbrowser
import requests
import htmlentitydefs
movie = quote(sys.argv[1])
philgruneich / cleanLinksRiposte.js
Created November 17, 2014 03:13
Sends URL to Clean Links and generates a Markdown link for Riposte
View cleanLinksRiposte.js
philgruneich / superstar.json
Created December 10, 2014 23:00
Superstar JSON
View superstar.json
"superstar_avg": {
"skill_modifiers": {
"punt_power": {
"cost": -0.2,
"max": 10
"tackle_awareness": {
"cost": -0.2,
"max": 10
philgruneich / Toggle Invisible Files.scpt
Created March 16, 2014 05:06
Show/Hide invisible files in Finder. Add to ~/Library/Application Support/Launchbar/Scripts to launch from Launchbar.
View Toggle Invisible Files.scpt
set stateMent to do shell script "defaults read AppleShowAllFiles"
if stateMent = "TRUE" then
do shell script "defaults write AppleShowAllFiles FALSE"
do shell script "defaults write AppleShowAllFiles TRUE"
end if
tell application "Finder" to quit
delay 2
launch application "Finder"
philgruneich / Groceries: Drafts, Ita and Fantastical
Created June 26, 2013 00:20
From Drafts, it creates an event on Fantastical named "Ir ao Supermercado" ("Go to the Supermarket", in portuguese), starting in your current day at 7PM and ending 30 minutes later. Then it attached the draft you wrote in Drafts to a Ita list named "Compras" ("Groceries", in portuguese). Previously, we also included the url-scheme to view this l…
View Groceries: Drafts, Ita and Fantastical