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/env ruby | |
# | |
# Brute-force way to retrieve all Github's repositories at once | |
# Usage: | |
# github_repos.rb clone # will clone all the user's repositories | |
# github_repos.rb clone test # will just clone 6 repositories for testing purposes | |
# github_repos.rb pull # will update all of the user's local repositories | |
# | |
# If you have forked repositories, the original sources will be added | |
# as remotes with the default 'forked_from' name, and a new 'forked_from' |
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 'rubygems' | |
require 'sinatra' | |
get '/' do | |
' | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> |
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
function pesquisarUsuario($usuarioTo, $numPagina=null, $qtdRegistros=null) { | |
$sql = ''; | |
$select = 'SELECT CD_USUARIO, CD_FUNC_ORIG, NOME, SOBRENOME, CPF, EMAIL, SENHA, DT_NASCIMENTO, SEXO, FL_RECEBE_EMAIL, FL_CONFIAVEL, CD_SITE_FUNC, FL_ATIVO, DH_CADASTRO, DH_ULTIMO_ACESSO '; | |
$selectCount = 'SELECT COUNT(*) '; | |
$from = ' FROM TB_USUARIO '; | |
$limit = ''; | |
if(isset($numPagina) && isset($qtdRegistros)){ | |
$numPag = ($numPagina - 1) * $qtdRegistros; | |
$limit = " LIMIT " . $numPag . ", " . $qtdRegistros; | |
} |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
</head> | |
<body> | |
<!-- topo --> | |
<div id="topo"> |
NewerOlder