# install dependecies
apt-get install qemu qemu-user-static binfmt-support
# download raspbian image
wget https://downloads.raspberrypi.org/raspbian_latest
# extract raspbian image
unzip raspbian_latest
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<script> | |
var ws = new WebSocket("ws://127.0.0.1:8765/"), | |
messages = document.createElement('ul'); |
license: gpl-3.0 | |
height: 300 |
# Firefox over VNC | |
# | |
# VERSION 0.3 | |
FROM ubuntu | |
# Install vnc, xvfb in order to create a 'fake' display and firefox | |
RUN apt-get update && apt-get install -y x11vnc xvfb firefox | |
RUN mkdir ~/.vnc | |
# Setup a password |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Inspired by: | |
* http://weeklybuild.com/2014/07/07/mjpeg-bottle-gstreamer/ | |
* http://www.ridgesolutions.ie/index.php/2014/11/24/streaming-mjpeg-video-with-web2py-and-python/ | |
* https://gist.github.com/n3wtron/4624820 | |
''' |
/* global require */ | |
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var sync = require('browser-sync'); | |
var source = require('vinyl-source-stream'); | |
var uglify = require('gulp-uglify'); | |
var plumber = require('gulp-plumber'); | |
var streamify = require('gulp-streamify'); | |
var watchify = require('watchify'); |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This is a fork of Mike Bostock's Line Transition.
This fork was originally intended to showcase a principle of using padding between the x and y axis. This is a concept I've seen covered over and over again when dealing with non-zero minimum value charts (see example).
I also found it interesting to update both the line and the x axis. It should be noted that this was not the intent of the line transition example, seeing that the line was treated as a queue, pushing and popping from the front and back of the data. It talked on how to prevent odd visual behavior of the path when those changes occur, nothing more or less.
That being said, the visual change to the axis was a hack (see x_axis_scale) to just better understand how useful a constant, fast linear change effects my comprehension of the data.
So far, my personal opinion is that when dealing with updating data similar to this, it is best to spend most of your no