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 / actions.yaml
Created December 21, 2022 17:23
Example of a github actions pipeline that sends an email via AWS SES when completed
name: Send email on pipeline completion
on:
# Trigger this workflow when the pipeline is completed
pipeline:
completed: true
jobs:
send-email:
runs-on: ubuntu-latest
@ricardofiorani
ricardofiorani / render_templates.php
Last active October 2, 2020 08:37
A simple example of framework-less PHP rendering templates to add translations (or any other dynamic content)
<?php
//Clean previous built files
array_map('unlink', glob(__DIR__ . '/public/*.html'));
array_map('unlink', glob(__DIR__ . '/public/pt-br/*.html'));
array_map('unlink', glob(__DIR__ . '/public/de/*.html'));
array_map('unlink', glob(__DIR__ . '/public/jp/*.html'));
//Scan for all templates
$templates = glob(__DIR__ . '/renderer/templates/*.php');;
$locales = glob(__DIR__ . '/renderer/locales/*.php');;
<!doctype html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<title>Hello, AMPs</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script type="application/ld+json">
{
<!doctype html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<title>Hello, AMPs</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script type="application/ld+json">
{
{
"message": "successful operation",
"content": [
{
"id": 1234,
"campsite_id": 1234,
"categories": [
{
"name": "Pitch",
"slug": "pitch"
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.umbernardo.calories.controller;
import br.com.umbernardo.calories.dao.DiarioDAO;
import br.com.umbernardo.calories.model.Diario;
import java.util.List;
@ricardofiorani
ricardofiorani / PokemonGoServerCheck.sh
Created July 19, 2016 12:57
Checks if brazilian Pokemon Go server is online
#!/bin/sh
## Checa se o servidor brasileiro de Pokemon Go esta online
while true
do
if (curl -s 'http://www.mmoserverstatus.com/pokemon_go' | grep 'Brazil<span><i class="fa fa-check green')
then
spd-say 'pokemon no brazil'
else
echo 'Offline'
fi
<nav class="menu">
<ul>
<li class="<?= $this->uri('/home', 'selected') ?><?= $this->uri('/', 'selected') ?>">
<a href="#">
<i class="icon icon-home"></i>
</a>
</li>
<li><a href="#">Institucional</a></li>
</ul>
</nav>
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.
#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);