This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -h HOST -u USERNAME --password=PASSWORD DATABASE -B -e "SELECT id,email,first_name,last_name,state,zip_code FROM users" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > filename.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# getting the facebook permanent session key. | |
s = Facebooker::Session.new( "API_KEY", "SESCRET_KEY") | |
s.auth_token = "THE_6_DIGIT_CODE" | |
s.secure! :generate_session_secret => false | |
puts s.session_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa -out private.key 2048 | |
Generating RSA private key, 2048 bit long modulus | |
..............................+++ | |
.+++ | |
e is 65537 (0x10001) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ openssl req -new -key private.key -out marrily.com.csr | |
You are about to be asked to enter information that will be incorporated | |
into your certificate request. | |
What you are about to enter is what is called a Distinguished Name or a DN. | |
There are quite a few fields but you can leave some blank | |
For some fields there will be a default value, | |
If you enter '.', the field will be left blank. | |
----- | |
Country Name (2 letter code) [AU]:US |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Wrapper on top of the HTTP client */ | |
function Request(url, options) { | |
if( !url ) { throw "Invalid URL"; }; | |
options = _.extend({ | |
method: 'GET', | |
async: true, | |
evalJSON: true, | |
parameters: {}, | |
headers: [], // [ [key, value], [key, value] ] | |
onSuccess: function(){}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marrily's data can be accessed via a RESTful interface. Here are the documentation on how to access the API. Currently the data are represented via JSON format only. | |
1. v1 API info | |
=============== | |
The current API is at v1, and the all API access is over HTTP, starting with | |
http://api.marrily.com/api/v1/ | |
If the subscription is expired, you will get a 402 error for non-GET requests (except for user's authentication). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page_id = 102329749861 | |
params = { | |
:v => '1.0', | |
:api_key => FACEBOOKER["api_key"], | |
:method => 'stream.get', | |
:format => 'XML', | |
:source_ids => page_id, | |
:session_key => 'bd7156a08fefbd368b54d2da-54500509', | |
:limit => 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TinyORM = (function(options) { | |
/* a hash containing all the available models */ | |
var Models = {}; | |
var connection = null; | |
var config = _.extend({ | |
/* The name of the database which Ti will open. The local db is located at: | |
~/Library/Application Support/iPhone Simulator/4.2/Applications/APP_ID/Library/Application Support/database/dbname | |
*/ | |
dbname: 'add.db', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TinyORM = (function(options) { | |
/* a hash containing all the available models */ | |
var Models = {}; | |
var connection = null; | |
var config = _.extend({ | |
/* The name of the database which Ti will open. The local db is located at: | |
~/Library/Application Support/iPhone Simulator/4.2/Applications/APP_ID/Library/Application Support/database/dbname | |
*/ | |
dbname: 'add.db', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var f,proxy,d=document; | |
var addCss = function(s) { | |
var c = d.createElement('style'); | |
c.type = 'text/css'; | |
if (c.styleSheet) | |
c.styleSheet.cssText = s; | |
else | |
c.appendChild(d.createTextNode(s)); | |
d.getElementsByTagName('HEAD')[0].appendChild(c); |