Skip to content

Instantly share code, notes, and snippets.

View victusfate's full-sized avatar
🚀

Mark Essel victusfate

🚀
View GitHub Profile
@victusfate
victusfate / gist:3463254
Created August 25, 2012 10:11 — forked from peterbraden/gist:3455116
Webcam Face Detection in 16 lines of Javascript
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);
@victusfate
victusfate / LICENSE.txt
Created August 17, 2012 14:48 — forked from djcsdy/LICENSE.txt
Music SoftSynth
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
@victusfate
victusfate / uninstall_homebrew.sh
Created July 27, 2012 13:10 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/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
@victusfate
victusfate / mdv.rb
Created July 17, 2012 14:18 — forked from mvz/mdv.rb
Dead-simple Markdown Viewer
#!/usr/bin/env ruby
require 'ffi-gtk3'
require 'github/markup'
GirFFI.setup :WebKit, '3.0'
Gtk.init
WebKit.set_cache_model :document_viewer
# 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.
@victusfate
victusfate / output.log
Created June 14, 2012 13:48
curl node repl (possibly dangerous?)
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$
/*
* 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
@victusfate
victusfate / couchdb-ec2-install.sh
Created April 11, 2012 09:05 — forked from msmith/couchdb-ec2-install.sh
Set up CouchDB on EC2
#!/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"
@victusfate
victusfate / fibonacci.coffee
Created April 9, 2012 09:43 — forked from violet-athena/fibonacci.coffee
Node.js non-blocking Fibonacci written on CoffeeScript
###
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) ->
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
});