Skip to content

Instantly share code, notes, and snippets.

@milroc
milroc / README.md
Last active October 23, 2019 20:09 — forked from mbostock/.block
Minimum Viable Chart Junk (Updating Line Chart)

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

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 13, 2024 02:39
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/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
@domenic
domenic / promises.md
Last active June 24, 2024 03:11
You're Missing the Point of Promises

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.

You're Missing the Point of Promises

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.
@jshbrntt
jshbrntt / gulpfile.js
Created May 12, 2014 19:53
Gulp + Watchify + Debowerify + Uglify
/* 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');
@ph1ee
ph1ee / mserv.py
Created September 25, 2015 11:33
Simple Bottle MJPEG Streamer
#!/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
'''
@keepitsimple
keepitsimple / Dockerfile
Created March 23, 2016 15:26
Docker: Firefox over VNC
# 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
@jkullick
jkullick / raspberry-pi-chroot-armv7-qemu.md
Last active March 24, 2024 14:36
Chroot into Raspberry Pi ARMv7 Image with Qemu
# 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
@Berzeg
Berzeg / .block
Last active May 16, 2024 16:21
Electrocardiogram
license: gpl-3.0
height: 300
@artizirk
artizirk / index.html
Last active September 1, 2022 17:12
Python asyncio websockets http static file server, aka http and websocket server on the same port: python-websockets/websockets#116
<!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');