Skip to content

Instantly share code, notes, and snippets.

View flpms's full-sized avatar

Filipe M. Silva flpms

View GitHub Profile
const host = 'https://api.github.com/';
const request = {
const req = (path, method, opts, params) => {
return fetch(`${host}/v3/${path}?${params}`, {
headers,
method,
...opts
});
};
{
"0": {
"Definição": "Transação autorizada com sucesso.",
"Ação": "-",
"Irreversível para as bandeiras": "-"
},
"00": {
"Definição": "Transação autorizada com sucesso.",
"Ação": "-",
"Irreversível para as bandeiras": "-"
[
{
"team": "Mercedes",
"date": "17/02/2022",
"hour": ""
},
{
"team": "Ferrari",
"date": "27/02/2011",
"BRTHour": ""
import React from 'react';
const getPercent = (percent, value) =>
(value * percent) / 100;
const colorTypes = new Map([
['r', 'rgb'],
['#', 'hex'],
['h', 'hsla']
]);
const str = ['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'];
let count = 0;
window.setInterval(() => {
console.log(str[count]);
count++;
});
export default function log(txt) {
console.log(txt);
}
@flpms
flpms / cadastro.php
Last active May 13, 2020 11:32
Cadastro do jornal nova ação feito em 2008 para o trabalho de conclusão de curso de web developer na microcamp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Cadastro De Alunos</title>
<style type="text/css">
<!--
@import url("estiloNovaAcao.css");
@flpms
flpms / jwtRS256.sh
Created May 5, 2020 18:00 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
const saveOrderWrapper = (dependencies) => {
const { repository, config } = dependencies;
const { mongoDB } = repository;
const { orderTTLInDays } = config.app;
const orderTTL = (millesecondsInADay * orderTTLInDays);
const asyncCall = prepareCall(dependencies);
class OperacoesBasicas {
soma(numeros) {
let i;
let totalSoma = 0;
for (i = 0; i < numeros.length; i++) {
totalSoma += numeros[i];
}
return totalSoma;