DEPRECATED. See https://github.com/fernandojunior/python-sqlite-orm
This file contains 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
#!/bin/bash | |
#install pip | |
sudo apt-get install python-pip | |
#install virtualenv | |
sudo pip install virtualenv | |
#install virtualenvwrapper |
This file contains 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://www.gnu.org/software/wget/manual/wget.html#Types-of-Files | |
wget -r -A .jpg,png http://url.com |
This file contains 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
from flask import Flask, g, request, jsonify, abort # http://flask.pocoo.org/ | |
from flask.ext.classy import FlaskView # http://pythonhosted.org/Flask-Classy/ | |
from db import DatabaseConnection, BaseManager, BaseEntity # https://gist.github.com/fernandojunior/63c6c676f6e16a1a7f0e | |
""" | |
Aplicação Web Restful simples utilizando o microframework Flask e a extenção Flask-Classy | |
Author Fernando Felix do Nascimento Junior | |
Gist https://gist.github.com/fernandojunior/45efd7f525338a82475c | |
""" |
This file contains 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
/** | |
* Retorna o valor de um parametro da url | |
* @param name Nome do parametro | |
* @ref http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript | |
**/ | |
function getParameter(name) { | |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
results = regex.exec(location.search); | |
return results === null ? null : decodeURIComponent(results[1].replace(/\+/g, " ")); |
This file contains 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
Hello World |
This file contains 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
/** | |
* Based on Parse.FacebookUtils. A provider for use the modified openFB in Parse. | |
* @author Fernando Felix do Nascimento Junior* | |
**/ | |
(function(root) { | |
root.Parse = root.Parse || {}; | |
var Parse = root.Parse; | |
var _ = Parse._; | |
var PUBLIC_KEY = "*"; |
This file contains 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
# The code below will read all the game information for you. | |
# On each game turn, information will be available on the standard input, you will be sent: | |
# -> the total number of visible enemies | |
# -> for each enemy, its name and distance from you | |
# The system will wait for you to write an enemy name on the standard output. | |
# Once you have designated a target: | |
# -> the cannon will shoot | |
# -> the enemies will move | |
# -> new info will be available for you to read on the standard input. | |
""" |
This file contains 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
# instalacao no ubuntu | |
apt-get install git | |
# iniciar git no diretorio | |
git init | |
# relaciona um repositorio remoto ao diretorio "origin" | |
git remote add origin [email protected]:account/repository_name.git | |
# puxa a branch "master" do repositorio para o diretorio "origin" |
This file contains 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 -p /path/to/somewhere/hostbdir | |
sshfs user@hostb:/path/to/some/dir/on/hostb /path/to/somewhere/hostbdir | |
# to unmount it you can do | |
fusermount -u /path/to/somewhere/hostbdir | |
# http://www.linuxquestions.org/questions/linux-software-2/how-does-one-make-a-virtual-ssh-directory-4175424521/ |
OlderNewer