Skip to content

Instantly share code, notes, and snippets.

View dulichan's full-sized avatar

Dulitha Wijewantha (Chan) dulichan

View GitHub Profile
@amadoru
amadoru / gist:4182564
Created December 1, 2012 14:23
Synonyms for Dulith
Disclaimer: I have not run these queries against any database and the syntax is in pure SQL so adjust as it fits and ignore typos
Create a table like this.
CREATE TABLE words (
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
group INT NOT NULL,
word VARCHAR(100) NOT NULL,
);
@zenkay
zenkay / gist:3237860
Created August 2, 2012 15:19
Installation tips for RVM/Ruby on OSX 10.8 Mountain Lion

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

@RajaS
RajaS / mongolab_demo.py
Created August 8, 2011 07:27
Using pymongo with mongolab
#!/usr/bin/python
# Raja Selvaraj <rajajs at gmail>
"""
Demonstrate use of pymongo to connect to a mongodb database on a hosted server,
specifically mongolab
"""
# Use a database already created on mongolab
@rbackhouse
rbackhouse / V8JavaBridgeExample.java
Created March 20, 2011 22:29
Example demonstrating using the V8 Java Bridge to run javascript with a callback into java
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import org.dojotoolkit.json.JSONParser;
import org.dojotoolkit.json.JSONSerializer;
import org.dojotoolkit.rt.v8.V8Exception;
import org.dojotoolkit.rt.v8.V8JavaBridge;