Skip to content

Instantly share code, notes, and snippets.


Bertrand Fan bertrandom

View GitHub Profile
View uber.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View mass.pde
void setup() {
background(255, 255, 255);
size(1120, 860);
translate(50, height - 15);
View gist:160861
* iphone actions.
* @package twonodes
* @subpackage iphone
* @author Bertrand Fan <b*******>
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
View Wrap Your Troubles in Dreams Tab
#----------------------------------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:
View RSA Token OCR Test
[root@server rsa]# cat
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 / Boxee Box Remote API.cpp
Created December 15, 2010 05:26
Boxee Box Remote API
View Boxee Box Remote API.cpp
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());
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
View gist:777410
stty -F /dev/ttyUSB0 9600 -parenb -cstopb -ixon
View memcached
#! /bin/bash
# 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 / pil.patch
Created October 12, 2011 16:45
Patch for PIL to install on Ubuntu 11.04
View pil.patch
--- setup.old 2011-10-12 16:37:50.034274363 +0000
+++ 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 / 30-pinning
Created October 13, 2011 19:35
APT config file for loading in oneiric repos
View 30-pinning
Package: *
Pin: release n=natty
Pin-Priority: 900
Package: *
Pin: release n=oneiric
Pin-Priority: 800