This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cocotouch.h" | |
#include <Adafruit_NeoPixel.h> | |
#include <avr/power.h> | |
#define PIN 8 | |
#define NUMPIXELS 60 | |
char index; | |
uint8_t idx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cocotouch.h" | |
#include <Adafruit_NeoPixel.h> | |
#include <avr/power.h> | |
#define PIN 5 | |
#define NUMPIXELS 60 | |
CocoTouch touch; | |
uint8_t touchstates[12]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const R = require('ramda'); | |
const Promise = require('es6-promise').Promise; | |
const pMap = require('./promise-map'); | |
function get(method) { | |
return Promise[method]({ | |
addresses: [ | |
{ street: 'street a' }, | |
{ street: 'street b' }, | |
{ street: 'street c' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore } from 'reflux' | |
// if you don't mind | |
import { pipe, of } from 'ramda' | |
import GalleryActions from '../actions/GalleryActions' | |
export default createStore({ | |
init(){ | |
this.galleryMap = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let obj = { | |
data: [ 'hello', 'world' ], | |
[Symbol.iterator]() { | |
const self = this; | |
let index = 0; | |
return { | |
next() { | |
if (index < self.data.length) { | |
return { | |
value: self.data[index++] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function run(element, cssProperty, value, duration) { | |
var initalValue = parseFloat(window.getComputedStyle(element)[cssProperty]); | |
var start = new Date().getTime(); | |
window.requestAnimationFrame(function step() { | |
var progress = new Date().getTime() - start; | |
var newValue = bounce(progress, initalValue, parseFloat(value) - initalValue, duration); | |
element.style[cssProperty] = newValue + 'px'; | |
if (progress < duration) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($, ShowDown, CodeMirror) { | |
"use strict"; | |
$(function() { | |
if (!document.getElementById('entry-markdown')) | |
return; | |
//var delay; | |
var converter = new ShowDown.converter(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" don't bother with vi compatibility | |
set nocompatible | |
" vundle start | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1 | |
function Car () {} | |
function Ticket () {} | |
function ParkingLot(capacity) { | |
this.capacity = capacity; | |
this.cars = []; | |
} |
NewerOlder