Skip to content

Instantly share code, notes, and snippets.

@wlaurance
wlaurance / charm.js
Last active December 19, 2015 15:59
simple charm progress bar
var charm = require('charm')();
charm.pipe(process.stdout);
charm.write('\n');
charm.cursor(false);
var start = 0,
end = 100,
prev = "";
@wlaurance
wlaurance / http-charm.js
Created July 12, 2013 01:28
http request charm progress
var charm = require('charm')(),
http = require('http');
charm.pipe(process.stdout);
charm.write('\n');
charm.cursor(false);
var options = {
hostname: 'nodejs.org',
port: 80,
@wlaurance
wlaurance / disco-http-charm.js
Created July 12, 2013 01:38
disco http charm bar
var charm = require('charm')(),
http = require('http');
charm.pipe(process.stdout);
charm.write('\n');
charm.cursor(false);
var options = {
hostname: 'nodejs.org',
port: 80,
node -p "var a"
undefined
node -e "var a"
#nothing
http://en.wikipedia.org/wiki/Split-brain_(computing)
brew install cmake
brew tap homebrew/science
brew install opencv --env=std
sudo cp /usr/local/Cellar/opencv/2.4.6.1/bin/* /usr/local/bin
@wlaurance
wlaurance / do.clj
Last active December 25, 2015 07:39
clojure if
(defn some-fn [l]
(mapv #(* 5 %) l))
(def thing nil)
(if (nil? thing)
(do (println "true") (some-fn [1 2 3]) true)
(do false))
@wlaurance
wlaurance / hello-world.coffee
Created November 7, 2013 20:03
coffeescript hello world
class Hello
toString: ->
'hello'
class World extends Hello
toString: ->
super() + ' ' + 'world'
earth = new World()
alert earth
@wlaurance
wlaurance / .gitignore
Last active December 27, 2015 17:49
github alphabet
node_modules