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
#!/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 |
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
## {{{ http://code.activestate.com/recipes/576704/ (r16) | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# pyminifier.py | |
# | |
# Copyright 2009 Dan McDougall <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
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); |
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
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
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
/* 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
$ 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
openssl genrsa -out private.key 2048 | |
Generating RSA private key, 2048 bit long modulus | |
..............................+++ | |
.+++ | |
e is 65537 (0x10001) |