Skip to content

Instantly share code, notes, and snippets.

View beriberikix's full-sized avatar
🐶
I have no idea what I'm doing

Jonathan Beri beriberikix

🐶
I have no idea what I'm doing
View GitHub Profile
@beriberikix
beriberikix / gist:6096633
Created July 27, 2013 23:02
j5 error on repl
string_decoder.js:109
charStr += buffer.toString(this.encoding, 0, end);
^
RangeError: toString() radix argument must be between 2 and 36
at Number.toString (native)
at StringDecoder.write (string_decoder.js:109:21)
at ReadStream.onData (readline.js:839:39)
at ReadStream.EventEmitter.emit (events.js:117:20)
at Board.<anonymous> (/Users/jberi/Desktop/node_modules/johnny-five/lib/board.js:284:27)
at Board.<anonymous> (/Users/jberi/Desktop/node_modules/johnny-five/lib/board.js:131:18)
@beriberikix
beriberikix / fullstack architecture diagram
Last active December 29, 2015 16:19
What does "Fullstack" mean for JS developers? Here's a stab at a crude architecture of decisions. Products and services are far from exhaustive and are only examples.
[ Scaling, nginx/ec2 auto scaling ][ Monitoring, dtrace/new relic ][ Logging, splunk/loggly ]
> [ Deployment, Chef ]
[ Frontend MV*, backbone/angular/ember ][ Visuals, bootstrap/foundation ]
[ Server framework, express, meteor ][ Templating, ejs/jade ][ Layout/styling, Sass ]
[ Language, Node.js/java/ruby ][ Persistance, mongo/mysql ][ Cache, memcache/redis ]
[ OS/container, mac/docker/vsphere ][ IaaS/PaaS/hosting, amazon/nodejitsu/digital ocean ]
@beriberikix
beriberikix / index.html
Last active January 1, 2016 23:09
Sample showing Google+ Sign-In, the Google Picker & Google Drive API.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- you can move signIn() configs into meta tags.
See https://developers.google.com/+/web/signin/reference#page-level_configuration_options -->
<title>Drive Picker & API Sample</title>
</head>
<body>
@beriberikix
beriberikix / equipmentlist.md
Created April 17, 2014 06:15
Uber list of apartment workbench equipemtn
Item Link Unit Price
foo bar baz
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@beriberikix
beriberikix / led_variable_light.ino
Created July 23, 2014 05:35
Hacky Arduino LED strip controller with 3 light modes - off, low and high
// stolen from the official debounce sample
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 11; // the number of the LED pin
// Variables will change:
int ledState = 0; // the current state of the output pin
int buttonState; // the current reading from the input pin
int lastButtonState = LOW; // the previous reading from the input pin
@beriberikix
beriberikix / index.js
Created February 28, 2015 19:20
Testing raspi-io
var raspi = require('raspi-io');
var five = require('johnny-five');
var board = new five.Board({
io: new raspi()
});
board.on('ready', function() {
var on = new five.Pin(8);
});
@beriberikix
beriberikix / Makefile
Created April 13, 2015 12:26
Hacky Makefile for Armstap's blinky sample. Forked from https://github.com/nitsky/stm32-example/blob/master/Makefile.
BUILDDIR = build
GCC_BIN = ../gcc-arm-none-eabi-4_9-2015q1/bin
#DEVICE = source
CORE = includes/CMSIS
PERIPH = includes/STM32F4xx_StdPeriph_Driver
STM = includes/STM32F4xx
#DISCOVERY = stm32/discovery
#SOURCES += $(DISCOVERY)/src/stm32f3_discovery.c
@beriberikix
beriberikix / apa102_raindbow_attiny85.ino
Created December 7, 2015 22:21
Demo using Pololu's APA102 library with an ATTiny85 @ 16 MHz.
/* This is a fork of the Raindbow sample from
* https://github.com/pololu/apa102-arduino/blob/master/examples/Rainbow/Rainbow.ino
* to work on an ATTiny85 @ 16MHz. While there is no license in the file, the overall
* library appears to be under MIT:
* https://github.com/pololu/apa102-arduino/blob/master/LICENSE.txt
*/
#include <avr/power.h>
#include <APA102.h>
@beriberikix
beriberikix / Settings.h
Created April 3, 2016 18:53
Convenient way to manage settings in the firebase-arduino examples
#ifndef _SETTINGS_H_
#define _SETTINGS_H_
// Wifi
#define SSID "your-network-name"
#define PASS "your-network-password"
// Firebase
#define FIREBASE_HOST "your-firebase-name.firebaseio.com"
#define FIREBASE_SECRET "###secret###"