Skip to content

Instantly share code, notes, and snippets.

View dscape's full-sized avatar

Nuno Job dscape

View GitHub Profile
var request = require('request')
, location = process.argv[2]
;
if(!location) {
throw new Error('sad panda');
}
request(
var five = require('johnny-five');
module.exports = function (cb) {
var board = new five.Board();
board.on('ready', function() {
var laser = new five.Led(12)
, onlineLed = new five.Led(13)
, servoX = new five.Servo(10)
, servoY = new five.Servo(9)
@dscape
dscape / fetch.sh
Created July 19, 2013 21:22 — forked from mmalecki/fetch.sh
#!/bin/sh
username=$1
git remote -v | grep "$username"
if [ $? -ne 0 ]; then
project=`git ls-remote --get-url | sed 's/.*\/\([a-z]*\).git/\1/g'`
git remote add "$username" "https://github.com/$username/$project.git"
fi
git fetch "$username"
var five = require('johnny-five'),
foldl = require('./hof').foldl
var leds =
[ 2
, 3
, 4
, 5
, 6
, 7

Debugging

  • node-inspector
  • brackets
  • node debug
  • console.log
  • dtrace
  • systap
  • repl
@dscape
dscape / stud
Last active January 5, 2016 23:49 — forked from ghcopy/stud
#!/bin/sh
### BEGIN INIT INFO
# Provides: stud
# Required-Start: $remote_fs $network $local_fs
# Required-Stop: $remote_fs $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The Scalable TLS Unwrapping Daemon
# Description: stud is a network proxy that terminates TLS/SSL
@dscape
dscape / couchdb-in-joyent-smart-os.md
Created January 4, 2013 12:14
Installing CouchDB In Joyent Cloud SmartOS

Simple:

pkgin in couchdb

Done.

Overview

PouchDB is a database written in JavaScript for web browsers that has in built sync capabilities.

For a long time 'web' was synonymous with 'online'. That is no longer the case, Mobile web usage is set to overtake desktop web usage shortly and a growing number of examples are showing that web technology is capable of handling the type of applications that were traditionally built using desktop native technology.

The new wave of offline web applications are going to need somewhere to store their data and they are going to need to learn how to move that data around as their user moves from device to device. How about we build a database with that functionality built in?

Objective

Auto CDN Idea

Look at our apps and see if they have static files. If they do, put them in a CDN and magically link the static files to that CDN, by either changing the source or any other means

We couldn’t find that file to show.