Skip to content

Instantly share code, notes, and snippets.

View ricardofiorani's full-sized avatar
🌎
I’m sorry, Earth is closed today. You better pack it up and get outta here.

Ricardo Fiorani ricardofiorani

🌎
I’m sorry, Earth is closed today. You better pack it up and get outta here.
View GitHub Profile
@ricardofiorani
ricardofiorani / condicao_de_uma_linha.php
Created October 1, 2014 13:51
Exemplo de condição php em uma linha
<li>
<a href="<?= $this->url(array('servicos-interna')) ?>#ancora-conteudo" title="Importação e Exportação"
class="<?= ($this->paginaAtual == 'servicos-interna') ? 'active' : '' ?>">
Importação e Exportação
</a>
</li>
public function control_contato() {
$this->titulo = 'Contato';
if ($_POST) {
if ($this->mailer->enviaEmail($_POST)) {
return $this->redirect('contato-sucesso');
} else {
return $this->redirect('contato-erro');
}
}
return $this->renderizar('contato');
@ricardofiorani
ricardofiorani / gist:31561e7471e1dbc278cf
Created January 5, 2015 13:50
Lista de Atividades MEI
<select id="form:meiMB_solicitacao_ocupacaoPrincipal" name="form:meiMB_solicitacao_ocupacaoPrincipal" class="inputText" size="1" onchange="A4J.AJAX.Submit('_viewRoot','form',event,{'control':this,'similarityGroupingId':'form:j_id82','parameters':{'ajaxSingle':'form:meiMB_solicitacao_ocupacaoPrincipal','form:j_id82':'form:j_id82'} ,'actionUrl':'/inscricaomei/private/pages/solicitacao.jsf'} )" onkeypress="return desabilitaTecla(event, TECLA_BACKSPACE);" style="width:800px;" tabindex="8">
<option value="">-- Selecione a Ocupação Principal --</option>
<option value="1">Abatedor(a) de aves</option>
<option value="2">Abatedor(a) de aves com comercialização do produto</option>
<option value="3">Acabador(a) de calçados</option>
<option value="5">Adestrador(a) de animais</option>
<option value="6">Adestrador(a) de cães de guarda</option>
<option value="7">Agente de correio franqueado e permissionário</option>
<option value="8">Agente de viagens</option>
<option value="9">Agente funerário</option>
public function exibirDataDiaMes($time) {
$mes_extenso = array(
'Jan' => 'Janeiro',
'Feb' => 'Fevereiro',
'Mar' => 'Marco',
'Apr' => 'Abril',
'May' => 'Maio',
'Jun' => 'Junho',
'Jul' => 'Julho',
'Aug' => 'Agosto',
public function exibirDataDiaMes($time) {
$data = DateTime::createFromFormat('Y-m-d', $time);
return $data->format('d/m/Y');
}
<script>
function main(){
var error = false;
var tela="";
var v = $("#in").val();
v = v.replace(/v/g, 'f');
v = v.replace(/s /g, '#@#');
v = v.replace(/#@#/g, 's ');
v = v.replace(/s/g, 'f');
@ricardofiorani
ricardofiorani / Output
Created September 5, 2015 13:12
Replication of php-imgur-api-client issue #4
string(27) "Var Dumping Gallery : 0kydF"
object(Imgur\Api\Model\GalleryAlbum)#61 (18) {
["ups":"Imgur\Api\Model\GalleryAlbum":private]=>
int(3774)
["downs":"Imgur\Api\Model\GalleryAlbum":private]=>
int(222)
["score":"Imgur\Api\Model\GalleryAlbum":private]=>
int(3555)
["isAlbum":"Imgur\Api\Model\GalleryAlbum":private]=>
bool(true)
<?php
/**
* Created by PhpStorm.
* User: Ricardo Fiorani
* Date: 01/10/2015
* Time: 18:23
*/
namespace Dificiometro\Application\Form;
#include <cstdlib>
#include <iostream>
#include <GL/glut.h>
using namespace std;
void desenha(){
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
Cyclobras Pedidos is a online web app for Hospitals used to order oncology supplies in order to diagnose cancer in patients. My contribution to this project was the Software Engineering and Development from scratch.