Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import urllib, re, argparse, subprocess, sys, eyeD3
parser = argparse.ArgumentParser(description='Get music from Soundcloud.')
parser.add_argument('music_page')
options = parser.parse_args()
tag = eyeD3.Tag()
@aaronbieber
aaronbieber / PebbleGlanceMulti.json
Created January 27, 2014 13:46
My "Multi" watchface for Pebble Glance
{
"layers_len": 6,
"name": "Multi",
"layers": [
{
"align": 2,
"bg": 0,
"fg": 1,
"font": 11,
"format": "%2",
@aaronbieber
aaronbieber / ttytter.pl
Created October 17, 2013 15:34
Fix the "rate limit rate failure" error in TTYtter. Users repeatedly receiving the error "-- rate limit rate failure: using 180 second fallback" can fix the issue by adding backslashes to the keys in the `$rate_limit_ref` hash. Previously no values were being returned, which resulted in a calculated rate limit of zero, hence the fallback. Find t…
$rate_limit_left = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'remaining'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'remaining'},
0+$rate_limit_ref->{'resources'}->{'search'}->{'\/search\/tweets'}->{'remaining'}));
$rate_limit_rate = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'limit'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'limit'},
@aaronbieber
aaronbieber / vimrc
Last active November 23, 2022 03:12 — forked from heygarrett/vimrc
" Set colorscheme to solarized
colorscheme solarized
" Change the Solarized background to dark or light depending upon the time of
" day (5 refers to 5AM and 17 to 5PM). Change the background only if it is not
" already set to the value we want.
function! SetSolarizedBackground()
if strftime("%H") >= 5 && strftime("%H") < 17
if &background != 'light'
set background=light