What did we achieve yesterday?

* worked on scripts to convert couchdb logs to json, then python to process the json 
* studied our model structure to better understand how objects relate to
  eachother see:

What is our aim for today?

* figure out why the schemas are the way they are
* figure out how well the actual data in couchdb matches the schemas
View fix_couchdb_rowsperpage.js
// ==UserScript==
// @name Force CouchDB to show 100 results per page
// @namespace
// @version 0.1
// @description try to take over the world!
// @author Stuart Powers
// @match http://*/_utils/*
// @grant none
// ==/UserScript==

Instruction to buildmachine:

This will create a customized OS image for the Raspberry Pi based on Raspian Jessie Lite.

There are 3 "machines" you will be working with

  • Host = Your computer
  • Build Machine = Virtual Box machine
  • Build = Simulated Raspberry Pi


def is_jsonlike(obj):
# Recursively checks if obj is composed
# only of JSON-compatible primitives
t = type(obj)
if t in (str, unicode, int, float, bool, type(None)):
return True
elif t is dict:
for key, value in obj.items():
if type(key) not in (str, unicode):
return False
View add_to_wishlish.js
function expand_wishlist(){
function add_to_wishlist(){
var aTags = document.getElementsByTagName("span");
var searchText = '{"type":"wishlist","id":"1FC8KCH8KCN1T"}'
import sys
import PIL
from PIL import ImageChops
from functools import reduce
import math, operator
def rmsdiff(im1, im2):
"Calculate the root-mean-square difference between two images"
h = ImageChops.difference(im1, im2).histogram()
import requests
import os
for i in range(20):
View logger.js
var spacing = (function (size) {
var result = '';
for (var i = 0; i < size; i++) {
result += '&nbsp;';
return result;
View gist:713d9779b9db38cf0771
osascript -e 'quit app "Google Chrome"'
sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/History "delete from urls where url like '%url_to_nuke%';"
View bitekite.txt
stu@redmac ~ $ curl -L --insecure -I
HTTP/1.1 301 Bounce
Date: Wed, 06 May 2015 06:10:44 GMT
Server: Apache
Location: /~bitekite/~bitekite/terms
Vary: Accept-Encoding
Content-Type: text/html
HTTP/1.1 301 Bounce
Date: Wed, 06 May 2015 06:10:44 GMT