Skip to content

Instantly share code, notes, and snippets.

View wei-lee's full-sized avatar

Wei Li wei-lee

  • Intercom
  • Dublin, Ireland
View GitHub Profile
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats

@wei-lee
wei-lee / gist:1336195
Created November 3, 2011 10:14 — forked from feedhenry-gists/gist:1015279
Web View Call
var url = http://www.example.com;
$fh.webview(
{'url':url, 'title':"hello"},
function(result){
if(result === "opened"){
//webview window is now open
}
if(result === "closed"){
//webview window is now closed
}
@wei-lee
wei-lee / gist:1298299
Created October 19, 2011 13:38 — forked from feedhenry-gists/gist:1015222
Orientation Call
$fh.ori( {act:'listen'},
function(res){
alert( 'current roation=' + res);
},
function(code,errorprops,params) {...} );
$fh.ori({act:'set', value:'landscape'}, function(res){
alert('orientation changed to ' + res.orientation);
}, function(code, errorprops, params){});
@wei-lee
wei-lee / gist:1178476
Created August 29, 2011 14:14 — forked from feedhenry-gists/gist:1015194
Local Storage Call
$fh.data( {act:'save', key:'foo', val:'bar'} );
$fh.data( {key:'foo'}, function(res) {
alert( res.key+'='+res.val );
});
@wei-lee
wei-lee / gist:1099663
Created July 22, 2011 15:20 — forked from feedhenry-gists/gist:1015130
Camera Call
$fh.cam({act:'picture'}, function(res){
var img = new Image();
img.src='data:image/'+res.format+';base64,'+res.b64;
} );