Skip to content

Instantly share code, notes, and snippets.

var ws281x = require('rpi-ws281x');
class Example {
constructor() {
this.config = {};
// Number of leds in my strip
this.config.leds = 169;
(ns reagent-test.core
(:require [reagent.core :as reagent :refer [atom]]
[datascript :as d]
[cljs-uuid-utils :as uuid]))
(enable-console-print!)
(defn bind
([conn q]
(bind conn q (atom nil)))
@wambat
wambat / USI_I2C.c
Last active August 29, 2015 14:24 — forked from PhirePhly/USI_I2C.c
// I2C library using USI hardware support
// Kenneth Finnegan, 2010
// kennethfinnegan.blogspot.com
// Heavily based on Atmel application note AVR310
#include <util/delay.h>
#include <avr/io.h>
#include <inttypes.h>
//#define PARAM_VERIFY
(ns reagent-test.core
(:require [reagent.core :as reagent :refer [atom]]
[datascript :as d]
[cljs-uuid-utils :as uuid]))
(enable-console-print!)
(defn bind
([conn q]
(bind conn q (atom nil)))
@wambat
wambat / unicorn
Last active August 29, 2015 14:02
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by [email protected] http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
We couldn’t find that file to show.
@wambat
wambat / gist:4039556
Created November 8, 2012 15:41
Who's up at lan
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done
@wambat
wambat / gist:1632921
Created January 18, 2012 13:05
ruby-debug19
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p290
@wambat
wambat / gist:1376063
Created November 18, 2011 10:04
Test rails routes
include Rails.application.routes.url_helpers