Skip to content

Instantly share code, notes, and snippets.

$ 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
@goldenboy
goldenboy / util.js
Created February 16, 2012 14:24 — forked from sr3d/util.js
/* 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(){},
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).
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
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',
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',
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);
@goldenboy
goldenboy / routes.py
Created February 10, 2012 15:03 — forked from gilsondev/routes.py
Exemplo usado na vídeo aula de rotas
#!/usr/bin/python
# -*- coding: utf-8 -*-
# default_application, default_controller, default_function
# are used when the respective element is missing from the
# (possibly rewritten) incoming URL
#
default_application = 'clientes' # ordinarily set in base routes.py
default_controller = 'clientes' # ordinarily set in app-specific routes.py
default_function = 'novo' # ordinarily set in app-specific routes.py
@goldenboy
goldenboy / microformats.py
Created December 8, 2011 20:57 — forked from k0001/microformats.py
Python microformats parser that supports hCard, hCalendar, hResume and rel-tag and provides an extensible model for other microformats.
# -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
Model for microformat properties and parsers. A microformat parser can
parse an HTML element into a dictionary of properties, whose keys are
strings and whose values are strings or other dictionary of properties.
As an example, the main program of this script parses an hResume from
given URL.
@goldenboy
goldenboy / google_hosts
Created December 3, 2011 10:06 — forked from agate/google_hosts
Hosts for google apps in China
203.208.46.166 www.google.com
203.208.46.166 www.google.com.hk
203.208.46.166 encrypted.google.com
203.208.46.166 encrypted.google.com.hk
203.208.46.166 mail.google.com
203.208.46.166 webcache.googleusercontent.com
203.208.46.166 plus.google.com
203.208.46.166 talkgadget.google.com
203.208.46.166 picasaweb.google.com
203.208.46.166 feedproxy.google.com