Skip to content

Instantly share code, notes, and snippets.

Avatar

Morgan 'ARR!' Allen morganrallen

  • Allen Industries
  • Oakland
View GitHub Profile
@lionello
lionello / nrf_ws2812.h
Last active Sep 16, 2017
Bit-banging a WS2812/WS2812B LED on Nordic nRF51 platform (nRF51422 or nRF51822)
View nrf_ws2812.h
#define NOP() __asm volatile ( "NOP" )
void ws2812_init(void)
{
NRF_GPIO->PIN_CNF[PIN_WS_DIN] = (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos)
| (GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos)
| (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)
| (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)
| (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos);
}
@NekR
NekR / fetch.md
Created Mar 25, 2015
Why so fetch?
View fetch.md

Why so fetch?

This is answer to this Jake's post http://jakearchibald.com/2015/thats-so-fetch/

First, I would begin with commenting this shining phrase:

Bit of a rant: it bothers me that as developers, we preach iterative development and release, but when we're the customers of that approach the reaction is all too often "HOW DARE YOU PRESENT ME WITH SUCH INCOMPLETE IMPERFECTION".

As a developer, when I provide incomplete, incremental product to my client, I always says sorry to them until it's fully done. But as you mentioned, you want hear from clients "SHUTUP AND TAKE MY MONEY". This does not seems like apology.

Okay, here I am going to agree what "final" abilities of fetch are cool, really, very usable. What is wrong with it is that it misses basic API from the beginning, it's like that your skate but without wheels, only suspension and nice colors.

View _README.md

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@substack
substack / detect.js
Created Oct 22, 2012
using falafel to write source transformations and to analyze variables
View detect.js
var falafel = require('falafel');
var fs = require('fs');
var src = fs.readFileSync(process.argv[2], 'utf8');
var out = falafel(src, function (node) {
if (node.type === 'VariableDeclarator') {
var context = parents(node).filter(function (x) {
return x.type === 'FunctionDeclaration'
|| x.type === 'FunctionExpression'
;
@tmpvar
tmpvar / flasher.js
Created Aug 11, 2012
quick and dirty .hex -> avr programmer using nodejs and node-serialport
View flasher.js
var
serialport = require('serialport'),
intelHex2Binary = require('./intelhex'),
fs = require('fs'),
sp = new serialport.SerialPort('/dev/tty.usbmodemfd121'),
argv = require('optimist').argv,
debug = 1,
s = function(d, fn) {
if (fn) {
cmds.push(function() {
You can’t perform that action at this time.