Skip to content

Instantly share code, notes, and snippets.

@robert-chiniquy
robert-chiniquy / grab-ratings.py
Created March 27, 2012 17:56
Grab track rating information from itunes library xml file and write to itunes using applescript
#! /usr/bin/env -i python
import xml.etree.ElementTree
import subprocess
tree = xml.etree.ElementTree.ElementTree()
tree.parse('iTunes Music Library.xml')
doc = tree.getroot()
@robert-chiniquy
robert-chiniquy / gist:5149524
Created March 13, 2013 05:05
quick geocode script
var geocoder = require('geocoder');
var async = require('async');
var eodata = require('./data.json');
process.stdout.write('[\n');
async.mapLimit(eodata, 1, function(item, callback) {
setTimeout(function() {
geocoder.geocode(item.StreetAddress, function(err, result) {
if (!result.results[0]) {
callback(result.status);
@robert-chiniquy
robert-chiniquy / gist:5247066
Created March 26, 2013 16:55
keystone bash
#! /bin/bash
[ -e ~/.raxrc ] || (echo -e "Please create a ~/.raxrc file with your credentials\nhttps://github.com/racker/rackspace-monitoring-cli#settings-credentials\n" >&2 && exit 1)
USERNAME=`grep username ~/.raxrc | awk -F'=' '{print $2}'`
API_KEY=`grep api_key ~/.raxrc | awk -F'=' '{print $2}'`
[ -z "$USERNAME" ] && (echo -e "No username in ~/.raxrc!" && exit 1)
[ -z "$API_KEY" ] && (echo -e "No api_key in ~/.raxrc!" && exit 1)
@robert-chiniquy
robert-chiniquy / gist:5297869
Created April 3, 2013 02:04
crime in chicago json
{ template: '<div class="panel {{class}}">\n <h3>{{header}}</h3>\n\n <ol class="chart-bar">\n {{#categories}}\n <li>\n <span class="point">\n <span class="idx" style="width: {{width}}%;"></span>\n <span class="label">{{category_name}}</span>\n <span class="count">{{crime_count}}</span>\n </span>\n </li>\n {{/categories}}\n </ol>\n</div>\n',
class: 'category',
header: 'Most frequent',
categories:
[ { crime_count: 1760,
category_name: 'Simple Battery',
width: 100 },
{ crime_count: 1329,
category_name: 'Theft',
width: 76 },
#!/bin/bash
####################
# CKAN installation script
# based on http://docs.ckan.org/en/master/install-from-source.html
####################
# @TODO Get these values as flags
dbpassword='abcde12345'
readonlydbpassword='abcde12345'
@robert-chiniquy
robert-chiniquy / authors and books.md
Last active August 29, 2015 14:24
Summer Mystery (mostly) Reading List Omnibus

Prompt

Please tell me all your good murder mysteries for summer vacations. In the past, I've enjoyed Dorothy Sayers, Stieg Larson, and such. So, think foreign or historical as well, for bonus points.

Responses

Novels

  • The Girl on the Train
  • The Girl in the Road
  • The Martian
@robert-chiniquy
robert-chiniquy / gist:7455989134ee61296d28
Last active March 5, 2024 09:44
Edimax EW-7811Un Linux drivers
http://www.edimax.com/edimax/mw/cufiles/files/download/Driver_Utility/transfer/Wireless/NIC/EW-7811Un/EW-7811Un_Linux_driver_v1.0.0.5.zip
or
mkdir -p /lib/firmware/rtlwifi
cd /lib/firmware/rtlwifi/
wget http://chromium.arnoldthebat.co.uk/files/fw/lib/firmware/rtlwifi/rtl8192cufw.bin