Skip to content

Instantly share code, notes, and snippets.

View bertrandom's full-sized avatar

Bertrand Fan bertrandom

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
void setup() {
background(255, 255, 255);
size(1120, 860);
translate(50, height - 15);
scale(0.1,-0.1);
frameRate(30);
<?php
/**
* iphone actions.
*
* @package twonodes
* @subpackage iphone
* @author Bertrand Fan <b*******@fan.net>
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
#----------------------------------PLEASE NOTE---------------------------------#
#This file is the author's own work and represents their interpretation of the #
#song. You may only use this file for private study, scholarship, or research. #
#------------------------------------------------------------------------------##
Song: Wrap Your Troubles in Dreams (and Dream Your Troubles Away)
Album: Sweet and Lowdown Soundtrack
Written by Ted Koehler, Bill Moll, and Harry Barris
Performed by Dick Hymen Group featuring Howard Alden
Tabbed by Matt Rader email: ucimaaat@hotmail.com
[root@server rsa]# cat process.sh
#!/bin/bash
convert -crop 13x23+142+124 -contrast -modulate 100 token.jpg digit1.tif
tesseract digit1.tif digit1 nobatch digits
convert -crop 13x22+154+124 -contrast -modulate 100 token.jpg digit2.tif
tesseract digit2.tif digit2 nobatch digits
convert -crop 13x22+167+125 -contrast -modulate 100 token.jpg digit3.tif
tesseract digit3.tif digit3 nobatch digits
convert -crop 11x21+187+125 -contrast -modulate 100 token.jpg digit4.tif
tesseract digit4.tif digit4 nobatch digits
@bertrandom
bertrandom / Boxee Box Remote API.cpp
Created December 15, 2010 05:26
Boxee Box Remote API
int CXbmcHttp::xbmcCommand(const CStdString &parameter)
{
if (shuttingDown)
return -1;
int numParas, retVal=false;
CStdString command, paras[MAX_PARAS];
numParas = splitParameter(parameter, command, paras, ";");
if (parameter.length()<300)
CLog::Log(LOGDEBUG, "HttpApi Start command: %s paras: %s", command.c_str(), parameter.c_str());
else
@bertrandom
bertrandom / gist:777410
Created January 13, 2011 04:45
Set RFID reader to communicate at 9600 baud, No Parity, One stop bit, and No Flow Control
stty -F /dev/ttyUSB0 9600 -parenb -cstopb -ixon
#! /bin/bash
### BEGIN INIT INFO
# Provides: memcached
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: memcached - Memory caching daemon
@bertrandom
bertrandom / pil.patch
Created October 12, 2011 16:45
Patch for PIL to install on Ubuntu 11.04
--- setup.old 2011-10-12 16:37:50.034274363 +0000
+++ setup.py 2011-10-12 16:39:27.226276274 +0000
@@ -212,6 +212,7 @@
add_directory(include_dirs, "/usr/local/include")
add_directory(library_dirs, "/usr/lib")
+ add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
add_directory(include_dirs, "/usr/include")
#
@bertrandom
bertrandom / 30-pinning
Created October 13, 2011 19:35
APT config file for loading in oneiric repos
Package: *
Pin: release n=natty
Pin-Priority: 900
Package: *
Pin: release n=oneiric
Pin-Priority: 800