Skip to content

Instantly share code, notes, and snippets.

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@peterbraden
peterbraden / gist:1644678
Created January 20, 2012 02:55
Face Detection in Node.JS
var cv = require('opencv')
var im = new cv.Image("./examples/test.jpg")
, face_cascade = new cv.CascadeClassifier("./examples/haarcascade_frontalface_alt.xml")
var faces = face_cascade.detectMultiScale(im, function(err, faces){
for (var i=0;i<faces.length; i++){
var x = faces[i]
im.ellipse(x.x + x.width/2, x.y + x.height/2, x.width/2, x.height/2);
}
@kfox
kfox / sysctl.conf
Created February 29, 2012 17:32
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@parkghost
parkghost / profilingtool.go
Last active January 3, 2023 10:47
a toolkit to help profiling go programmes
package main
import (
"fmt"
"log"
"os"
"runtime"
"runtime/debug"
"runtime/pprof"
"strconv"