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
__author__ = 'gbaldera' | |
from flask import Flask, request, g, redirect, url_for, abort, render_template | |
app = Flask(__name__) | |
app.config.from_object(__name__) | |
@app.route('/', methods=['GET', 'POST']) | |
def usuarios(): |
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
{ | |
"require": { | |
"illuminate/foundation": ">=1.0.0", | |
"illuminate/auth": ">=1.0.0", | |
"illuminate/database": ">=1.0.0", | |
"illuminate/view": ">=1.0.0", | |
"amazonwebservices/aws-sdk-for-php": "1.5.*", | |
"codeguy/upload": "*", | |
"sybio/image-workshop" : "*", |
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
/*! | |
* apibuilder | |
* Copyright (c) 2012 Christian Sullivan <[email protected]> | |
* MIT Licensed | |
*/ | |
var request = require('superagent'); | |
/** | |
* Module Exports |
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
LoadingTableViewRow = function(message) { | |
var row = Titanium.UI.createTableViewRow({ | |
height: 70, | |
touchEnabled: false | |
}); | |
var indicator = Titanium.UI.createActivityIndicator({ | |
width:"auto", | |
height: 30, | |
color: "665b5b", |
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
// Traditional | |
$parts = explode(' ', $dateTime); | |
$dates = explode('/', $parts[0]); | |
$times = explode(':', $parts[1]); | |
// check to see if it is am or pm | |
if(strtolower($parts[2]) == 'pm' && $times[0] != 12) { | |
// add 12 to the hour as it needs to be military time | |
$times[0]+=12; | |
} |
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 win1 = Titanium.UI.createWindow({ | |
title:'Tab 1', | |
backgroundColor:'#fff', | |
layout: 'vertical' | |
}); | |
var bt1 = Ti.UI.createButton({title: 'send message (method 1)', top: 200}); | |
bt1.addEventListener('click', function(e) |
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 Dashboard = require('dashboard'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor:'lightgray' | |
}); | |
var view = new Dashboard.View(); | |
var data = []; | |
for(var i = 0; i < 20; i++){ |
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
mkdir ~/git/website.git && ~/git/cd website.git | |
git init --bare | |
mkdir ~/webapps/website | |
git config core.bare false | |
git config core.worktree /home/rafi/webapps/website ; NO TRAILING SLASH!!! Will screw up things real bad. | |
git config receive.denycurrentbranch ignore | |
; create a hook | |
cat > hooks/post-receive | |
#!/bin/sh |
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
foreach ($arr1 as $k => $v) | |
{ | |
if (array_search($v, $arr2) !== FALSE) | |
unset($arr1[$k]) | |
} |
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 SplitView = require('splitview'); | |
/** | |
* SplitView Public Methods: | |
* | |
* split.initWithMasterAndDetailWindows( Ti.UI.Window, Ti.UI.Window ); | |
* split.openInMaster( Ti.UI.Window ) | |
* split.openInDetail( Ti.UI.Window ) |