Skip to content

Instantly share code, notes, and snippets.

@pietgeursen
pietgeursen / MyArray.js
Last active January 25, 2016 04:08
array methods
'use strict'
class MyArray {
constructor(arr){this.arr = arr}
filter(shouldKeepFunc){
let newArray = []
for (let i = 0; i < this.arr.length; i++) {
let item = this.arr[i]
if(shouldKeepFunc(item)){
@pietgeursen
pietgeursen / rx-fun.js
Created July 6, 2016 04:05
Kea 2016 rx breakout
var Rx = require('rx')
var slowSource = Rx.Observable.create(function(observer) {
var count = 0
setInterval(function() {
observer.onNext(count++)
}, 1000)
})
import React from 'react'
import { render as renderDom } from 'react-dom'
import {createStore} from 'redux'
const INCREMENT = 'INCREMENT'
const increment = (howMuch) => { return {type: INCREMENT, amount: howMuch} }
const Counter = (props) => {
return (
<div>

Backfill

These are just ideas, riff on them! Think about spikes, timeboxes, pairing, tdd. These are all things you might use to help. Think about this is an iterative process, try some things then come back to us with more questions.

React

  • react tic tac toe intro is a very verbose intro to react.
  • Pick any app like twitter or facebook, take a screenshot and then have a go at drawing boxes around what you think would make good components. Would they be smart or dumb?
var pull = require('pull-stream')
var audio = require('read-audio')
var clear = require('clear')
var dataThrough = pull.map(function(sample) {
return sample.data
})
var rmsThrough = pull.map(function(arr) {
var squares = arr.map(function(num) {
@pietgeursen
pietgeursen / node_dev_env.md
Last active October 19, 2016 02:08 — forked from mixmix/node_dev_env.md
node dev env

linux

install basic tools. In terminal :

sudo apt-get update
sudo apt-get install curl git zsh build-essential
'use strict';
const dotenv = require('dotenv')
const geocoder = require('geocoder');
const Rx = require('rx')
const {Observable} = Rx
const {create, fromEvent, fromNodeCallback} = Observable
// load environment variables
dotenv.load()
@pietgeursen
pietgeursen / test-bay.md
Created April 7, 2017 10:27
How to spin up a dev version of patchbay

Make the temp directory and copy the sbot plugins + config

mkdir ~/.test
cp ~/.ssb/config ~/.test/config
cp ~/.ssb/node_modules ~/.test/node_modules

Start the server ssb_appname=test sbot server

Connect

Start gdb server

JLinkGDBServer -device NRF51 -if SWD

Start gdb

arm-none-eabi-gdb /*.out