Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
{
"plugins": [
"react"
],
"ecmaFeatures": {
"jsx": true
},
// I want to use babel-eslint for parsing!
"parser": "babel-eslint",
"env": {
@gyaresu
gyaresu / gist:1848acc320e4c441d995
Last active August 29, 2015 14:21
Nodeschool Vancouver 2015-07-25

Dear NodeSchoolers,

Hi!

I'm { Gareth: https://twitter.com/gyaresu }

I'll be one of the mentors helping out on International NodeBots day and I must say, I'm REALLY EXCITED!

Teaching is the best way to learn, and I love hanging out with people who are brave enough to learn new things. So thanks!

@27Bslash6
27Bslash6 / phantom-docker-daemon.sh
Last active August 29, 2015 14:23
How does the docker daemon respond if it's not running?
# Ubuntu 14.10
uname -a
## Linux box 3.16.0-41-lowlatency #55-Ubuntu SMP PREEMPT Sun Jun 14 18:59:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/issue
## Ubuntu 14.10 \n \l
# Latest Docker development version
docker -v
## Docker version 1.7.0-dev, build 6a7a757
@johnnyji
johnnyji / partytime.js
Created July 25, 2015 21:56
It's Party Time
var sys = require("sys");
var exec = require('child_process').exec;
var five = require('johnny-five');
var board = new five.Board();
function puts(err, stdout, stderr) { sys.puts(stdout) };
board.on('ready', function() {
console.log("board ready");
var button = new five.Button(5);
@gyaresu
gyaresu / bots
Created July 25, 2015 20:25
bot servo test
var five = require('johnny-five')
var board = new five.Board()
board.on('ready', function () {
var servo = new five.Servo(9)
board.repl.inject({
servo: servo
})
@nmn
nmn / pureFunctions.js
Last active August 29, 2015 14:26
Quick and dirty hack to make pure functions work in React:
function component(fn){
class C extends React.Component {
render(){
return fn(this.props, this.context)
}
}
C.displayName = fn.displayName || fn.name
C.propTypes = fn.propTypes
C.contextTypes = fn.contextTypes
return C
@StevenLangbroek
StevenLangbroek / component-with-decorator.js
Created August 7, 2015 07:16
Difference between mixins and higher-order components (as ES7 decorators).
import React from 'react';
function animateIn(Component){
return class DecoratedComponent extends React.Component {
componentWillEnter(){
// Do some swanky animation
}
render(){
// Inherit all props
@vrunoa
vrunoa / logcat.log
Last active January 24, 2016 20:37
Compass Card fareboot log
Compass card (NXP MIFARE DESFire EV1)
application > 1 0 0
file no > 0
read data > 90 bd 0 0 7 0 0 0 0 0 0 0 0
result > 91 ae
Clipper card(MIFARE DESFire)
application > 90 11 f2
file no > 1
read data > 90 bd 0 0 7 1 0 0 0 0 0 0 0
FIR: Input Samplerate: 2000000, Output Samplerate: 500000, Signals: 100, Signal len: 29573
set_data: 0.01
set_center_freq: 0.01
dst.reset: 0.00
xlating_filter: 14.09
get_data: 1.58
misc: 0.02
signal_start: 0.93
fft: 1.46
shift_fft: 1.78
from PIL import Image
import struct
import sys
imgsize = 128
img = Image.new('L', (imgsize, imgsize))
with open("lily.cfile", "rb") as f:
while True: