Skip to content

Instantly share code, notes, and snippets.

View renoirtech's full-sized avatar

Renoir dos Reis renoirtech

View GitHub Profile
@renoirtech
renoirtech / semantic-branch-names.md
Last active March 21, 2024 13:26 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Branch Names

See how a minor change to your commit message style can make you a better programmer.

Format: <type>/<task-slug>

Examples

feature/registration-page
@renoirtech
renoirtech / pre-push.sh
Last active October 13, 2022 19:27 — forked from ogorzalka/pre-commit.sh
Only push if pint validation find no errors
#!/bin/bash
# Check if Laravel Pint is installed.
which ./vendor/bin/pint &> /dev/null
if [[ "$?" == 1 ]]; then
echo -e "\e[31mPlease install Pint (composer require laravel/pint --dev)\e[0m"
exit 1
fi
@renoirtech
renoirtech / createCsvAndUploadToAwsS3.php
Created January 29, 2019 19:07
[Laravel] Create a CSV and upload to AWS S3
<?php
use League\Csv\Writer;
use League\Csv\Reader;
use League\Csv\CannotInsertRecord;
use Illuminate\Support\Facades\Storage;
$now = now()->format('U');
$fileName = "file-$now.csv";
$storageInstance = Storage::disk('s3');
drop table "examination_question" cascade;
@renoirtech
renoirtech / nodeInstall.sh
Created December 6, 2016 00:57
Install the latest STABLE version of node.js using apt-get
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
@renoirtech
renoirtech / criaListaSpamLitmus.js
Last active December 6, 2016 19:05
Snippet que obtem a lista de emails para teste de SPAM do litmus e gera um arquivo CSV.
/* jQuery Date Format
* https://github.com/phstc/jquery-dateFormat
*/
var DateFormat={};!function(a){var b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=["January","February","March","April","May","June","July","August","September","October","November","December"],f={Jan:"01",Feb:"02",Mar:"03",Apr:"04",May:"05",Jun:"06",Jul:"07",Aug:"08",Sep:"09",Oct:"10",Nov:"11",Dec:"12"},g=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}[Z\-+]?(\d{2}:?\d{2})?/;a.format=function(){function a(a){return b[parseInt(a,10)]||a}function h(a){return c[parseInt(a,10)]||a}function i(a){var b=parseInt(a,10)-1;return d[b]||a}function j(a){var b=parseInt(a,10)-1;return e[b]||a}function k(a){return f[a]||a}function l(a){var b,c,d,e,f,g=a,h="";return-1!==g.indexOf(".")&&(e=g.split("."),g=e[0],h=e[e.length-1]),f=g.split(":"),3===f.length?(b=f[0],c=f[1],d=f[2].replace(/\s.+/,"").replace(/[a-
@renoirtech
renoirtech / maiorValor.js
Last active October 24, 2016 13:42
Escreva um algoritmo que leia 10 valores e mostre o maior valor lido.
/*
* Autor: Renoir dos Reis
* Licensa: Aberto a todos.
* Feito sob demanda por solicitação de Marquinho da dupla Henrique e Hernane
*/
//DECLARAÇÃO DE VARIÁVEIS
var cont = 0; //tipo inteiro;
var cont1 = 0;
var valor = 0;
@renoirtech
renoirtech / getSteamDbGameTitles.js
Created August 2, 2016 22:50
Captura todos os nomes de jogos da sua Steam e transforma em texto puro.
// DECLARAÇÃO DE VARIÁVEIS
var tabela = document.getElementById('table-apps');
var $a = tabela.getElementsByTagName('A');
var body = document.getElementsByTagName('BODY');
body = body[0];
//FUNÇÕES
function criaTexto(texto){
// CRIAÇÃO DE ELEMENTOS DOM
#include<stdio.h>
int main(){
//Declaração de Variáveis
int jogo;
char times[20][15] = {"Corinthians","Atlético-MG","Grêmio","Santos","São Paulo","Internacional","Sport","Palmeiras","Ponte Preta","Flamengo",
"Cruzeiro","Atlético-PR","Fluminense","Chapecoense","Figueirense","Havaí","Coritiba","Goias","Joinville","Vasco da Gama"};
int pontos[20] = {70,62,56,50,50,50,49,48,47,44,44,42,40,39,35,34,33,31,30,30};
int menu, opcao, realpos=0, i=0;
//Entrada de dados
printf("Digite a opção que você deseja\n(1-para mostrar a Tabela)\n(2-para simular): ");
#include<stdio.h>
int main(){
//Declaração de Variáveis
int jogo;
char times[20][15] = {"Corinthians","Atlético-MG","Grêmio","Santos","São Paulo","Internacional","Sport","Palmeiras","Ponte Preta","Flamengo",
"Cruzeiro","Atlético-PR","Fluminense","Chapecoense","Figueirense","Havaí","Coritiba","Goias","Joinville","Vasco da Gama"};
int pontos[20] = {70,62,56,50,50,50,49,48,47,44,44,42,40,39,35,34,33,31,30,30};
int menu=0, opcao, realpos=0, i=0;
//Entrada de dados
while ((menu > 0) && (menu<3)) {