Skip to content

Instantly share code, notes, and snippets.

@smashwilson
smashwilson / ocr.rb
Created April 12, 2014 14:26
Read images from a webcam. OCR any text and write it to stdout.
require 'hornetseye_v4l2'
require 'hornetseye_xorg'
require 'hornetseye_rmagick'
require 'tesseract'
include Hornetseye
camera = V4L2Input.new
image = X11Display.show { camera.read }
image.to_ubytergb.save_ubytergb 'snapshot.png'
@phillipkoebbe
phillipkoebbe / multiple_find_replace.py
Created December 25, 2011 17:47
Sublime Text 2 Multiple Find/Replace script
# This script allows you to do multiple find/replace operations in one pass. The find/replace
# pairs are defined in a file (defaults to ~/.st2_multiple_find_replace) using the format
#
# find <separator> replace
# By default, the separator is the hash-pointer (=>), but it can be changed if
# necessary (see below). To use multiple find and replace, save this code to a file in
# your Packages/User folder using whatever name you like. I use multiple_find_replace.py.
# Edit your user key bindings and pick whatever key combinations you want to trigger
# these operations. On Mac OS X, I chose COMMAND+OPTION+M E to edit and COMMAND+OPTION+M R
@sbp
sbp / jquery.paginator.js
Created August 20, 2011 11:23
jQuery Paginator script
/*!
* jQuery Paginator v1.0 - 20 Aug 2011
* Copyright 2011 Sean B. Palmer, Apache License 2.0
* http://sbp.so/paginator
*/
$(function () {
var body = $('body');
var content = false;
@kyokutyo
kyokutyo / men.vbs
Created October 23, 2010 07:14
2.5分経つとビープ音で知らせてくれるラーメンタイマー
Dim WshShell
Dim intMsg
Set WSHShell=Wscript.CreateObject("Wscript.Shell")
intMsg = WSHShell.Popup ("3分たったら、お知らせします",5,"ラーメンタイマー",vbOKOnly)
Wscript.sleep(2.5 * 60 * 1000)
'' for test : sleep 1 second
'Wscript.sleep(1000)
WshShell.Run "CMD.EXE /CECHO "&String(3,7),0,True