Skip to content

Instantly share code, notes, and snippets.

View josephwinston's full-sized avatar

Joseph Winston josephwinston

View GitHub Profile
@josephwinston
josephwinston / pf.md
Created July 25, 2014 23:57 — forked from ryanzhou/pf.md

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

@josephwinston
josephwinston / myviz.html
Created June 14, 2015 23:08
Output from `~/anaconda/bin/python foo.py --vispy-glir-file=myviz.html`
This file has been truncated, but you can view the full file.
[["CURRENT", 0],
["FUNC", "clearColor", 1.0, 1.0, 1.0, 1.0],
["FUNC", "clear", 17664],
["FUNC", "viewport", 0, 0, 800, 600],
["FUNC", "disable", "cull_face"],
["CREATE", 16, "Program"],
["SHADERS", 16, "\nprecision highp int;\nprecision highp float;\nvec4 null_transform_map(vec4 pos) {return pos;}\n\nuniform vec4 u_scale;\nuniform vec4 u_translate;\n\nvec4 st_transform_map_1(vec4 pos) {\n return vec4(pos.xyz * u_scale.xyz + u_translate.xyz * pos.w, pos.w);\n}\n\n\nuniform vec4 u_scale_1;\nuniform vec4 u_translate_1;\n\nvec4 st_transform_map_3(vec4 pos) {\n return vec4(pos.xyz * u_scale_1.xyz + u_translate_1.xyz * pos.w, pos.w);\n}\n\n\nuniform vec4 u_scale_2;\nuniform vec4 u_translate_3;\n\nvec4 st_transform_map(vec4 pos) {\n return vec4(pos.xyz * u_scale_2.xyz + u_translate_3.xyz * pos.w, pos.w);\n}\n\n\nuniform vec4 u_scale_3;\nuniform vec4 u_translate_4;\n\nvec4 st_transform_map_5(vec4 pos) {\n return vec4(pos.xyz * u_scale_3.xyz + u_translate_4.xyz * pos.w, pos.w);\n}\n\n\nvec4 null_transform_
#! /bin/sh
mkdir bin
curl -L git.io/weave -o ./bin/weave
chmod +x ./bin/weave
wget -O ./bin/scope git.io/scope
chmod +x ./bin/scope
@josephwinston
josephwinston / test.output.txt
Created May 17, 2016 19:30
Output from stoke's make test on Ubuntu 14.04 LTS running on VM.
This file has been truncated, but you can view the full file.
$ make test > /tmp/test.output.txt 2>&1
make -C . external EXT_OPT="debug"
make[1]: Entering directory `/tmp/stoke'
./scripts/make/submodule-init.sh src/ext/cpputil
./scripts/make/submodule-init.sh src/ext/x64asm
make -C src/ext/x64asm EXT_OPT="debug" COMPILERBINARY="g++"
make[2]: Entering directory `/tmp/stoke/src/ext/x64asm'
make -C . erthing OPT="-DNDEBUG -O3"
make[3]: Entering directory `/tmp/stoke/src/ext/x64asm'
$ minimesos init
Unable to find image 'containersol/minimesos:0.9.0' locally
0.9.0: Pulling from containersol/minimesos
4d06f2521e4f: Pull complete
691bd2bdacdc: Pull complete
7a7569255cff: Pull complete
fdcd9b3d4706: Pull complete
Digest: sha256:eca942e1b59a2a12a30333328723db4e1b5b232a446a7941e0cb548ed020a06c
Status: Downloaded newer image for containersol/minimesos:0.9.0
minimesos init
Unable to find image 'containersol/minimesos:0.9.0' locally
0.9.0: Pulling from containersol/minimesos
4d06f2521e4f: Pull complete
691bd2bdacdc: Pull complete
7a7569255cff: Pull complete
fdcd9b3d4706: Pull complete
Digest: sha256:eca942e1b59a2a12a30333328723db4e1b5b232a446a7941e0cb548ed020a06c
Status: Downloaded newer image for containersol/minimesos:0.9.0
Initialized minimesosFile in this directory
@josephwinston
josephwinston / gist:fc99563cfc70967973200c81661c3d3e
Created December 20, 2016 01:26
simba http_server + websocket (fails)
/**
* @section License
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016, Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@josephwinston
josephwinston / gist:bad243712d8ba6fc91b80176dfd5a28b
Created December 20, 2016 16:49
simba http_server + websocket with socket initialization
/**
* @section License
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016, Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@josephwinston
josephwinston / gist:5ae12386bb02629bf2c46ca121637e37
Created December 30, 2016 17:00
Invalid transaction schema
## docker pull bigchaindb/bigchaindb
## docker run --rm -v "$HOME/bigchaindb_docker:/data" -ti bigchaindb/bigchaindb -y configure
## docker run -v "$HOME/bigchaindb_docker:/data" -d --name bigchaindb -p "58080:8080" -p "59984:9984" bigchaindb/bigchaindb start
## docker-machine ip bigchaindb
from bigchaindb_driver import BigchainDB
bdb = BigchainDB('http://192.168.99.100:59984/api/v1') # From docker-machine ip bigchaindb and docker ps
bicycle = {
@josephwinston
josephwinston / gist:6a56be07f7f086dc52cc95db3f9faeb7
Created December 30, 2016 17:21
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4009: ordinal not in range(128)
docker build --tag local-bigchaindb .
Sending build context to Docker daemon 2.293 MB
Step 1 : FROM rethinkdb:2.3
2.3: Pulling from library/rethinkdb
75a822cd7888: Pull complete
6e2d8dd0ca87: Pull complete
e56239563bb3: Pull complete
bf0f28d27004: Pull complete
1c6ba2c166ad: Pull complete
Digest: sha256:ab81bd8c5d8514b416331a00da048f0c041787e0a3f0d93219e46db069d65a58