This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.auth import HTTPBasicAuth | |
CLIENT_ID = '' | |
CLIENT_SECRET = '' | |
TOKEN_URL = 'https://services.rdio.com/oauth2/token' | |
API_URL = 'https://services.rdio.com/api/1/' | |
# GET TOKEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# readlater.sh -- a time waster by Bill Israel <[email protected]> | |
# | |
# Think of it as an overly simplified, text-based version of Instapaper | |
# without most of the cool features. | |
# | |
# The path to your read later file (I recommend it being a file in Dropbox) | |
RL_FILE="$HOME/Dropbox/readlater.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Join the channel you want to register. Make sure you're an op (either the first to join, or someone who is an op there sets you to +o). | |
/join #newchannel | |
/msg chanserv register #newchannel | |
/msg chanserv set #newchannel mlock +cnt-s | |
/msg chanserv set #newchannel guard on | |
/msg chanserv set #newchannel secure on | |
/msg chanserv set #newchannel topiclock on | |
/msg chanserv set #newchannel keeptopic on | |
/msg chanserv set #newchannel url http://example.org/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Notify someone if a website is unavailable. | |
Usage: | |
isitup.py [-v] <site> <from_email> <to_email> <smtp_user> <smtp_password> | |
isitup.py -h|--help | |
isitup.py --version | |
Options: | |
-h --help Print this message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import urllib2 | |
import contextlib | |
from bs4 import BeautifulSoup | |
if len(sys.argv) < 2: | |
print 'Error: Please provide a URL to scrape.' | |
sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import urllib2 | |
import contextlib | |
URL='http://api.openweathermap.org/data/2.5/weather?q=Nashville,TN&units=imperial' | |
with contextlib.closing(urllib2.urlopen(URL)) as r: | |
response = json.loads(r.read()) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An afternoon distraction by Bill Israel. | |
`hipchat-music.py` will send a notification to a HipChat chat room with the | |
artist and song title of the currently playing song. Supported music apps | |
include iTunes, Rdio, and Spotify. | |
_Note: This code uses v2 of the HipChat API._ | |
Requirements: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# TODO: Document this | |
# | |
# AUTHOR: Bill Israel [https://github.com/epochblue] | |
# LICENSE: Public Domain | |
BOOMDB_DEFAULT="$HOME/.boomdb" | |
BOOMDB=${BOOMDB:=$BOOMDB_DEFAULT} | |
# Ensure the DB file exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A command line utility for automatically generating PNG thumbnails and | |
# CMYK prints for http://framemyrun.com/ | |
# | |
# Author: Bill Israel <[email protected]> | |
# | |
# LICENSE: | |
# This code is considered to be in the Public Domain. Use, copy, modify, | |
# distribute, sell, and do anything else you want with it. The author |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Should be installed into $TODO_ACTIONS_DIR/doneon | |
# Note: be sure to make the script executable (chmod +x path/to/file) | |
# | |
action=$1 | |
shift | |
function usage { |