Skip to content

Instantly share code, notes, and snippets.

View fundon's full-sized avatar
🎯
Focusing

Fangdun Tsai fundon

🎯
Focusing
View GitHub Profile
Rails (or Node.js) Web App for syncing data folders between Google Docs and Dropbox. No desktop client needed.
- OAuth (a must!)
- Dropbox API:
+ https://www.dropbox.com/developers/releases (OAuth)
+ http://github.com/riscfuture/dropbox (OAuth)
- Google Docs GData API:
+ http://code.google.com/apis/gdata/articles/gdata_on_rails.html (OAuth)
+ http://cookingandcoding.com/2010/04/28/gdocs4ruby-access-google-docs-api-with-ruby/
- "Google Docs" folder, be able to rename it

IMPORTANT! Wikified version of this page may be found here. Feel free to edit. :)

Note that since it's kind of PITA to merge changes from other gists it's recommended that you do your changes directly to the wiki!

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
Aves Commercial? Obsolete. Company bought by Zynga.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
Grab latest ubuntu 11.04 64bit canonical ami from alestic - http://alestic.com/
Create new ec2 instance + add ebs volume (/dev/sdf) + elastic ip
# update hostname + /etc/host
sudo hostname fe1-us.dustinwhittle.net
# add user account + configure keys in sshd_config + add ssh key
@fundon
fundon / mapreduce.js
Created June 29, 2011 10:11 — forked from adomado/mapreduce.js
Simple MapReduce with Javascript
var Job = {
data : [
"We are glad to see you here. This site is dedicated to",
"poetry and to the people who make poetry possible",
"poets and their readers. FamousPoetsAndPoems.com is",
"a free poetry site. On our site you can find a large",
"collection of poems and quotes from over 631 poets",
"Read and Enjoy Poetry",
"I, too, sing America",
var number = 10;
var showNumber = function () {
alert(number);
}
(function () {
number = 20;
showNumber();
})()
@fundon
fundon / binarytree.js
Created August 25, 2011 09:29
Binary tree in JavaScript
function cons(x, y) {
return function(w) { return w(x, y) };
};
function car(z) {
return z(function(x, y) { return x });
};
function cdr(z) {
return z(function(x, y) { return y });
@fundon
fundon / LICENSE.txt
Created August 31, 2011 13:41 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@fundon
fundon / gist:1237047
Created September 23, 2011 09:44 — forked from plu/gist:1236941
[:WebBrowser] [:WebApp] [:WebSocket] [:RabbitMQ] [:Worker]
| | | | |
|-------- Login --------->| | |<-- Create Worker Queue --|
| | | | |
|<--- Response (ExtJS) ---| | | |
| | | |
|----------- Connect (socket.io) --------->| | |
| | | |
| |-- Create Client Queue -->| |
| | | |
@fundon
fundon / sparc.c
Created November 16, 2011 02:36 — forked from vmg/sparc.c
Sparks in C
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
int main
(int argc
,char *ac []){int i, count = argc - 1;
double * dvalues=malloc(01- 01+count*
sizeof(double)+1); double mi=DBL_MAX,ran=.0,ma =DBL_MIN,mo;for(i= 00; argc>1
&&i<count;i=i+8-7) {double val = atof(ac[i+1]) ;if(23&&val<mi)mi= val;if(val