Skip to content

Instantly share code, notes, and snippets.

View dshaw's full-sized avatar
🦄
Always bet on Node.js ✨

Dan Shaw dshaw

🦄
Always bet on Node.js ✨
View GitHub Profile
Verifying that +dshaw is my blockchain ID. https://onename.com/dshaw
@dshaw
dshaw / nsolid-install.sh
Last active October 19, 2015 05:20 — forked from pmuellr/nsolid-install.sh
install N|Solid components into ~/nsolid
#!/bin/sh
#-------------------------------------------------------------------------------
# download/unpack componentry for N|Solid into ~/nsolid
#-------------------------------------------------------------------------------
# directories
DIR_DOWN=~/Downloads
DIR_INST=~/nsolid
@dshaw
dshaw / nodebook.md
Last active November 17, 2022 14:50
Running Node on a Samsung 303C Chromebook

Running Node on a Samsung 303C Chromebook

Motivation

After @mikeal and @lyle purchased Chromebooks for kids activities at NodeConf 2014, I was very impressed with the device and decided to explore this as a laptop and hacking device for my kids (7 & 8). I'd love to retain the simplicity of the web-focused ChromeOS experience while letting my kids hack on NodeBots and learn how to program.

It seems like the platforms that ChromeOS runs on are quite diverse. The Samsung 303C hit the right balance of being an aesthetically pleasing looking device, having respectable build quality and the amazing $250 price point. The 303C has an ARM processor. Not all Chromebooks do. I'm writing the below step-by-step very specifically for this system.

Resources

@dshaw
dshaw / server.js
Last active January 3, 2016 14:59
var jade = require('jade')
, data = require('./data.json')
;
var header = new Buffer('HTTP/1.1 200 OK\r\n\r\n');
var server = require('net').createServer(function(conn) {
conn.write(header);
conn.close();
}).listen(8000);
@dshaw
dshaw / levelup.md
Last active November 17, 2022 14:52
Leveling-up on Node

Core Principals

  • Read lots of code.
  • Write lots of code.
  • Don’t be afraid to throw it away.
  • Don’t be afraid to share it.
  • Find your happy place writing tests.
    • You’ll probably spend more time writing tests and debugging than writing code. Embrace this. Make it a key part of your workflow.
    • Tests are one of the first things I read in a module. That and the example(s). Probably before API docs.
  • Don’t know where to start. Write some tests for a module you like. This benefits everyone.
@dshaw
dshaw / fconflicted_dropbox.sh
Created May 14, 2013 20:08
Find and remove conflicted copy files from Dropbox.
alias fconflicted = find . -name '*(*conflicted copy*)*'
alias frmconflicted = find . -name '*(*conflicted copy*)*' | sed 's/.*/"&"/' | xargs rm
@dshaw
dshaw / shasum.js
Created February 24, 2013 05:28
shasum with sha1 in node v0.9+
var hash = require('crypto').createHash('sha1')
hash.setEncoding('hex')
process.stdin.pipe(hash).pipe(process.stdout)
@dshaw
dshaw / RealtimeConf2012.md
Created October 29, 2012 17:18
Realtime Conf 2012 Talks