Skip to content

Instantly share code, notes, and snippets.

View epochblue's full-sized avatar

Bill Israel epochblue

View GitHub Profile
@epochblue
epochblue / lookbusy.py
Created April 19, 2011 18:52
Just tell 'em you're seeding the search index...
#!/usr/bin/env python -tt
import time
import random
OMGBUSY = """
>> execute: Splitting up dataset, running from {0} to {1}
>> routingPattern Connect route "taggable_add_tag" (/admin/addTag/:object_class/:object_id)
>> routingPattern Connect route "taggable_remove_tag" (/admin/removeTag/:object_class/:object_id)
>> routingPattern Connect route "prestaSitemap_index" (/sitemap.xml)
@epochblue
epochblue / quix.txt
Created December 2, 2011 23:04
My @quixapp commands
> quix command file
> Bill Israel [http://cubicle17.com/]
> More: http://quixapp.com/
@reading/saving
rl javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/cyjbYZ10F5ue?u='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0) Read Later
pb javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=700,height=350')); Bookmark
@misc
@epochblue
epochblue / backup.sh
Created December 18, 2011 17:31
The backup script I use to backup the data I care about.
#!/usr/bin/env bash
# backup -- a time waster by Bill Israel
#
# The backup script I use to backup the data I care about.
# Is run daily via cron.
# Must have remote folder param
[ -z "$1" ] && echo -e "usage: $0 REMOTE_FOLDER\n" && exit 1
@epochblue
epochblue / hack.sh
Last active October 2, 2015 14:58 — forked from erikh/hack.sh
OS X Hidden Prefs Installer
#!/usr/bin/env sh
##
# This is script with useful tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2264647/hack.sh | sh
#
@epochblue
epochblue / .osx_defaults
Last active December 25, 2015 19:59
.osx_defaults is an install script for consistent settings across machines. Copied from: https://github.com/DAddYE/dotfiles/blob/545a5fcb3662f06d159d3339ca9cec4a37c06c05/.osx_defaults
#!/bin/sh
#
# Author: htt://billisrael.ifno/
# Original Author: http://daddye.it
# Original Original Author: @mathiasbynens
#
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@epochblue
epochblue / doneon
Last active December 27, 2015 04:49
A few add-ons for `todo.sh`: doneon: shows you items that were completed on a given date yesterday: shows you items that were completed yesterday edit: allows you to edit one of the todo.sh files without having to know its full path
#!/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 {
@epochblue
epochblue / fmr.sh
Created February 1, 2014 20:13
A command line utility for automatically generating PNG thumbnails and CMYK prints for http://framemyrun.com/
#!/usr/bin/env bash
# A command line utility for automatically generating PNG thumbnails and
# CMYK prints for http://framemyrun.com/
#
# Author: Bill Israel <bill.israel@gmail.com>
#
# 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
@epochblue
epochblue / boom.sh
Last active September 20, 2021 11:14
A simple key-value "store" for use on the command line. Conceptually similar to Zach Holman's boom (https://github.com/holman/boom), but simpler and all in shell.
#!/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
@epochblue
epochblue / hipchat-tuneage.py
Last active August 29, 2015 14:00
A small CLI app for changing the topic in a HipChat room to the currently playing song.
"""
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:
@epochblue
epochblue / weather.py
Last active August 29, 2015 14:06
A simple script for retrieving current Nashville weather.
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())