View standup-2016-07-13.md

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: https://github.com/sente/BeLL-Apps-runner/tree/master/schema

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 http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Stuart Powers
// @match http://*/_utils/*
// @grant none
// ==/UserScript==
View README.md

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

Requirements

View jsonlike.py
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(){
document.getElementById('add-to-wishlist-button').click()
}
function add_to_wishlist(){
var aTags = document.getElementsByTagName("span");
var searchText = '{"type":"wishlist","id":"1FC8KCH8KCN1T"}'
View imgdiff.py
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()
View download-html-pages.py
import requests
import os
try:
os.makedirs('final')
except:
pass
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;
})(4);
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 https://bitekite.com/~bitekite/terms
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