Skip to content

Instantly share code, notes, and snippets.

View PrototypeAlex's full-sized avatar

PrototypeAlex PrototypeAlex

  • Wellington, New Zealand
View GitHub Profile

Keybase proof

I hereby claim:

  • I am prototypealex on github.
  • I am prototypealex (https://keybase.io/prototypealex) on keybase.
  • I have a public key ASBnAUwiNowqcoBXT05OOnw98EFfkUzR8MasyWuU-t0dYgo

To claim this, I am signing this object:

@PrototypeAlex
PrototypeAlex / codes.txt
Last active January 30, 2016 02:53
NodeBots Wellington Photon Codes
Hello keen Robotisist,
In the kit you have in front of you should be everything you need to build a SumoBot.
Every photon (the little chip labeled Photon) has a name, which will be under the chip (between the foam and the chip), please don't lose this name, you'll need it to figure out the device ID below. Additionaly, please put the kit back in the packet it came in, and try not to mix kit up, it takes a lot of time to audit the gear before events.
The link below gives a basic guide to setting up your SumoBot, and does a much better job than me at explaining things (Thanks Rick Waldron):
https://bocoup.com/weblog/controlling-the-robotsconf-sumobot-with-spark-core-johnny-five
@PrototypeAlex
PrototypeAlex / .bash-output
Created October 19, 2015 20:31
rwaldron/johnny-five install output
➜ nodebots npm install git://github.com/rwaldron/johnny-five.git
npm WARN package.json nodebots@1.0.0 No description
npm WARN package.json nodebots@1.0.0 No repository field.
npm WARN package.json nodebots@1.0.0 No README data
> firmata@0.7.1-pre-2 postinstall /Users/alex/Development/nodebots/node_modules/johnny-five/node_modules/firmata
> node scripts/postinstall
\
> serialport@1.7.4 install /Users/alex/Development/nodebots/node_modules/johnny-five/node_modules/firmata/node_modules/serialport
@PrototypeAlex
PrototypeAlex / errors.md
Created January 27, 2015 05:43
Errors: NodeJS Wellington - Lighting Talk

Errors

throw new Error('undefined is undefined in anon:30')

Operational vs Exceptional

@PrototypeAlex
PrototypeAlex / gist:f7aed2fc2a294ef8ac83
Created September 12, 2014 21:27
Malt.com api for hubot
# Description
# Lists what beers are available on tap at a few of Wellington's Pubs
#
# Dependencies:
# "scraper": "0.0.7"
#
# Configuration:
# NONE
#
# Commands:
@PrototypeAlex
PrototypeAlex / deps
Last active September 15, 2016 08:40
Error: Invariant Violation: dangerouslyRenderMarkup(...): Cannot render markup in a Worker thread.
✗ npm list react mocha chai jsdom
reactor@0.0.1 /Users/alex/Development/reactor
├── chai@1.9.1
├─┬ gulp-mocha@0.4.1
│ └── mocha@1.20.1
├─┬ gulp-sass@0.7.2
│ └─┬ node-sass@0.9.3
│ └── mocha@1.18.2
├── jsdom@0.11.1
├── mocha@1.20.1
@PrototypeAlex
PrototypeAlex / whats-on-tap.coffee
Created July 4, 2014 07:21
Whats on tap in Wellington
# Description
# Lists what beers are available on tap at a few of Wellington's Pubs
#
# Dependencies:
# "request": "^2.36.0"
# "lodash": "^2.4.1"
#
# Configuration:
# NONE
#
@PrototypeAlex
PrototypeAlex / gist:3712107
Created September 13, 2012 05:35
SQL LITE SOT
create table cities (
code varchar(3) primary key,
name text
);
create table people (
email text check ( email like '%@%' ),
gender text not null check ( gender in ('M', 'F') ),
name text not null,
password text,
@PrototypeAlex
PrototypeAlex / gist:3519662
Created August 29, 2012 22:21
Dynamically sized Nav menus with fixed scrolling
# Menubar Scrolling
header_h = -> $('#header').outerHeight()
content_h = -> $('#content .container .row').outerHeight() - 22
footer_h = -> $('#footer').outerHeight()
left_column_h = -> $('.content_left_column').outerHeight()
right_column_h = -> $('.content_right_column').outerHeight()
nav_and_flash_h = -> $('#content-header').outerHeight() + $('.flash_container').outerHeight()
@PrototypeAlex
PrototypeAlex / redirect_problem.rb
Created December 19, 2011 21:22
Redirect_to problem
// LockerController
def make_payment
@locker = Locker.find(params[:id])
respond_to do |format|
if !@locker || @locker.user
format.html { redirect_to user_lockers_url, notice: "Opps, something went wrong, please try again" }
else