Skip to content

Instantly share code, notes, and snippets.

{"path": "M736.2645654309484,467.5757348533573L736.6529990518399,466.7600758523091L736.6070039186307,466.83344797665245L736.6115504280433,466.860870496673L736.3935989988977,467.3008228563748ZM725.6788322306921,466.7935341126392L725.6701259156198,466.7386075433721L725.5308126959886,466.5917622639155L725.5816066861912,466.5461750999686ZM727.3895648492623,466.2397774390163L727.435913271382,466.1666674624771L727.4388376626412,466.18497381649377ZM727.435913271382,466.1666674624771L727.4388376626412,466.18497381649377L727.3895648492623,466.2397774390163ZM726.6689434005675,467.18058038238337L726.2347937338516,467.005613052142L725.9270349897822,466.8949383793443L725.9255825973027,466.8857844406506ZM736.8369264493745,466.46656639453016L736.6529990518399,466.7600758523091L736.6070039186307,466.83344797665245L736.6115504280433,466.860870496673L736.3935989988977,467.3008228563748L736.2645654309484,467.5757348533573L735.9979180490603,467.0188268031687L736.4382683914347,466.1663613605355L736.4352376824203,466.1480771942447
@parente
parente / panic.log
Created August 28, 2013 19:47
PACKER_LOG=1 packer build -var my_box_2013_08_28
virtualbox (vagrant): Compressing: metadata.json
2013/08/28 14:40:48 ui: virtualbox (vagrant): Compressing: metadata.json
2013/08/28 14:40:48 /home/myuser/bin/packer-post-processor-vagrant: 2013/08/28 14:40:48 Box add: '/tmp/packer961736518/packer-disk1.vmdk' to 'my_box_2013_08_28'
virtualbox (vagrant): Compressing: packer-disk1.vmdk
2013/08/28 14:40:48 ui: virtualbox (vagrant): Compressing: packer-disk1.vmdk
2013/08/28 14:42:06 /home/myuser/bin/packer-builder-virtualbox: SIGSEGV: segmentation violation
2013/08/28 14:42:06 /home/myuser/bin/packer-builder-virtualbox: PC=0x407ebf
2013/08/28 14:42:06 /home/myuser/bin/packer-builder-virtualbox:
2013/08/28 14:42:06 /home/myuser/bin/packer-builder-virtualbox:
2013/08/28 14:42:06 /home/myuser/bin/packer-builder-virtualbox: goroutine 1 [IO wait]:
@parente
parente / us-east-west.json
Created September 5, 2013 02:24
U.S. state capitals sorted East to West by longitude. For TotT JS session #1 lab.
[
{
"city": "Augusta",
"state": "Maine",
"longitude": 69.78
},
{
"city": "Boston",
"state": "Massachusetts",
"longitude": 71.07
@parente
parente / custom.css
Created September 10, 2013 13:13
TOC in the View menu of IPython Notebook. Tested in 0.9.
.ui-menu {
width: 300px !important;
}
div.code_cell {
page-break-after: always;
page-break-inside: avoid;
}
.rendered_html h4 {
@parente
parente / .screenrc
Created October 3, 2013 12:23
My common .screenrc, cobbled together over time.
zombie q
termcapinfo xterm*|rxvt*|kterm*|Eterm* ti@:te@
hardstatus alwayslastline "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
bind R eval "source $HOME/.screenrc" "echo '.screenrc reloaded!'"
@parente
parente / package.json
Created October 14, 2013 23:20
Sample package.json file for TotT
{
"name": "totter",
"version": "0.0.1",
"description": "Demonstration module for TotT",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
@parente
parente / check_focusable.py
Created October 21, 2013 02:10
Accerciser example rule
class CheckFocusable(Validator):
def condition(self, acc):
# only test accessibles that have the action interface
return acc.queryAction()
def after(self, acc, state, view):
# check an accessible after checking its descendants
# acc is the accessible
# state is a dictionary of whatever you need to store across tests
# view logs errors, warnings, etc.
pass
@parente
parente / proxy.py
Created October 21, 2013 02:15
Extended Python weakref proxy supporting bound and unbound methods and arbitrary callables
import weakref, new
class Proxy(object):
'''
Our own proxy object which enables weak references to bound and unbound
methods and arbitrary callables. Pulls information about the function,
class, and instance out of a bound method. Stores a weak reference to the
instance to support garbage collection.
@organization: IBM Corporation
@parente
parente / iris.csv
Created December 14, 2013 22:13
Iris Dataset CSV for TotT jQuery session
Sepal Length Sepal Width Petal Length Petal Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@parente
parente / guess.js
Created February 7, 2014 20:41
Guessing game for TotT
/*
Write a JS guessing game that picks a random, secret number between 1 and 100, lets the user take up to 5 guesses, and states if the secret number is equal to, higher, lower than a guess. Read input from stdin and print to stdout.
*/
var correct = Math.floor(Math.random()*100)+1;
// console.log(correct);
var MAX_TRIES = 5;
var readline = require('readline');
var rl = readline.createInterface(process.stdin, process.stdout);
var guesses = 0;