Skip to content

Instantly share code, notes, and snippets.

Maykel Santos Braz maykelsb

Block or report user

Report or block maykelsb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
maykelsb / Estrutura de banco de dados
Created Oct 10, 2016
Consulta os objetos de banco de dados
View Estrutura de banco de dados
FROM (SELECT DISTINCT table_schema AS objeto,
'esquemas' AS tipo
FROM information_schema.tables
WHERE table_schema != 'pg_catalog'
AND table_schema != 'information_schema'
SELECT table_schema || '.' || table_name AS objeto,
CASE WHEN table_type = 'BASE TABLE' THEN 'tabelas'
View collection_widget.twig
{% block collection_widget %}
{% spaceless %}
<div class="collection">
{% if prototype is defined %}
{% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %}
{% endif %}
<div {{ block('widget_container_attributes') }}>
{{ form_errors(form) }}
{% for rows in form %}
View presencas simplificado
SELECT cae.caenome as nome,
cae.caecpf as cpf,
SUM(frq.frqqtdpresenca) as qtdpresenca
FROM projovemurbano.cadastroestudante cae
INNER JOIN projovemurbano.frequenciaestudante frq ON frq.caeid = cae.caeid
INNER JOIN projovemurbano.diariofrequencia dif ON dif.difid = frq.difid
INNER JOIN projovemurbano.diario dia ON dia.diaid = dif.diaid
INNER JOIN projovemurbano.periodocurso prc USING(perid)
-- WHERE cae.caeid = 44327
View presencas
SELECT nome,
sum(qtd_periodo1) as qtd_periodo1,
sum(qtd_periodo2) as qtd_periodo2,
sum(qtd_periodo3) as qtd_periodo3,
sum(qtd_periodo4) as qtd_periodo4,
sum(qtd_periodo5) as qtd_periodo5,
sum(qtd_periodo6) as qtd_periodo6,
sum(qtd_periodo7) as qtd_periodo7
FROM (SELECT cae.caenome as nome,
View gist:6064074
function parsePostSegundaEtapa() {
// -- Validando $_POST e $_FILES
if (empty($_POST) ) {
$e = new Exception('Tipo de requisição inválida.');
throw $e;
$arquivos = array();
// -- Lista de documentos enviados pelo proponente
$documentos = array('contrato_social', 'rg_e_cpf', 'comp_endereco',
'comp_bancario', 'logo');
View acl_linha_a_linha.php
foreach ($rowset['rs'] as $item) {
$acoes = array('acoes' => '');
$acl = Zend_Registry::get('acl');
$resource = $acl->formatNameResource(array('module' => 'unidade', 'controller' => 'index'));
if ($acl->isAllowed(null, $resource, 'get')) {
$acoes['acoes'] .= $this->view->open('Unidade', $item->id_unidade_prisional, 'Abrir Unidade Prisional');
View gist:5529672
-- 1)
function enemy:shoot()
local Bullet = require "Bullet";
Bullet.owner = self;
-- the same as your previous code
function enemy:canShootAgain()
self.activeBul = false;
You can’t perform that action at this time.