Skip to content

Instantly share code, notes, and snippets.

@fake-or-dead
fake-or-dead / tesseract.rb
Created July 27, 2015 20:41
tesseract ocr with training
require "formula"
class Tesseract < Formula
desc "OCR (Optical Character Recognition) engine"
homepage "https://github.com/tesseract-ocr/"
url "https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz"
sha1 "a950acf7b75cf851de2de787e9abb62c58ca1827"
revision 3
bottle do
@marc-hughes
marc-hughes / debouce.dart
Last active August 17, 2022 10:11
debounce function for dart
library debounce;
Map timeouts = {};
void debounce(int timeoutMS, Function target, List arguments) {
if(timeouts.containsKey(target)) {
timeouts[target].cancel();
}
Timer timer = new Timer(new Duration(milliseconds: timeoutMS), () {
@paolorossi
paolorossi / html5-video-streamer.js
Created March 7, 2012 13:21
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';