This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cv = require('opencv') | |
new cv.VideoCapture(0).read(function(mat){ | |
mat.resize(200,100) | |
mat.detectObject("./data/haarcascade_frontalface_alt.xml", {min : [30,30]}, function(err, faces){ | |
for (var i=0;i<faces.length; i++){ | |
var x = faces[i] | |
mat.ellipse(x.x + x.width/2, x.y + x.height/2, x.width/2, x.height/2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'ffi-gtk3' | |
require 'github/markup' | |
GirFFI.setup :WebKit, '3.0' | |
Gtk.init | |
WebKit.set_cache_model :document_viewer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello, Git. Let's make you better. | |
alias g="git" | |
# Sensible git defaults: | |
# ---------------------- | |
alias gadd="git add --verbose" # Make it print out the files added. | |
alias ggrep="git grep --color=always -I" # Colored; don't search binary files (-I). | |
alias gdiff="git diff --color --patch-with-stat" # Show stats of each commit; color. | |
alias glog="git log --color --graph --decorate --date=relative" # Color; short dates; have a small "graph" lines on the left. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
josh@onix:/tmp/http-repl$ curl -sSNT. localhost:8000 | |
Actual repl over http. NOW WITH A LIMITED CONTEXT!! | |
>> help | |
'Exits are North, South and Dennis.' | |
>> .exit | |
Terminal exiting. | |
You'll want to mash ctrl-c. | |
^C | |
josh@onix:/tmp/http-repl$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Mclarens Bar: Redis based Instant Messaging | |
* Nikhil Marathe - 22/04/2010 | |
* A simple example of an IM client implemented using | |
* Redis PUB/SUB commands so that all the communication | |
* is offloaded to Redis, and the node.js code only | |
* handles command interpretation,presentation and subscribing. | |
* | |
* Requires redis-node-client and a recent version of Redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
Original project here: https://github.com/glenjamin/node-fib , | |
this is CoffeeScript rewrite of the app. Nothing more, nothing less. | |
### | |
app = require("express").createServer() | |
port = "3000" | |
fibonacci = (n, callback) -> | |
inner = (n1, n2, i) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.submittable').live('change', function() { | |
$(this).parents('form:first').submit(); | |
}); |