Skip to content

Instantly share code, notes, and snippets.

View Adejair's full-sized avatar
🎯
Focusing

Adejair Júnior Adejair

🎯
Focusing
View GitHub Profile
@Adejair
Adejair / .gitconfig
Created February 14, 2022 23:57
my gitconfig
# My Git config inspired by Rodrigo Manguinho and Otavio Lemos
[user]
email = adejair.junioroulook@gmail.com
name = Adejair Jr
[alias]
s = !git status -s
c = !git add --all && git commit -m
l = !git log --pretty=format:'%C(blue)%h%C(red)%d %C(yellow)%s - %C(cyan)%cn, %C(green)%cr'
@Adejair
Adejair / waldemar.js
Created March 7, 2021 20:30
Waldemas
async function getShop(){
const response = await fortniteAPI.getDailyShop();
return response.json();
}
var server = http.createServer(async (req, res) => {
var loja = await getShop();
@Adejair
Adejair / payment.js
Created February 10, 2021 18:59
Algoritmo para gerar os dias uteis de 2021
(() => {
const moment = require("moment-business-days");
moment.locale("pt-br");
// Começar com espaço em branco.
let utilDays = [];
for (var i = 1; i <= 12; ++i) {
const arrayDaysUtils = moment(
@Adejair
Adejair / app.js
Created November 20, 2020 01:53
Problema de contagem - João Gabriel
// Ajustar de acordo com o retorno do seu banco de dados...
const documents = [
{
documentName: "Arquivo_Do_Adestoso.jpg",
path: "RG"
},
{
documentName: "Arquivo_do_Gildo.pdf",
/*
* 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.
*/
/**
*
* @author UniRV_2
@Adejair
Adejair / triangulo.dart
Created June 18, 2019 16:17
Triangulo DART
class Triangulo {
double ladoA;
double ladoB;
double ladoC;
Triangulo(double ladoA, double ladoB, double ladoC) {
this.ladoA = ladoA;
this.ladoB = ladoB;
this.ladoC = ladoC;
@Adejair
Adejair / lorem_ipsum.tex
Created June 17, 2019 17:51
lorem_ipsum.tex
\documentclass[article,12pt,oneside,a4paper,brazil,sumario=tradicional]{abntex2}
% Pacotes usados
\usepackage{times}%Usa a fonte Latin Modern
\usepackage[T1]{fontenc}%Selecao de codigos de fonte.
\usepackage[utf8]{inputenc}%Codificacao do documento
\usepackage{indentfirst}%Indenta o primeiro parágrafo de cada seção.
\usepackage{microtype}%Para melhorias de justificação
\usepackage{lipsum}%Para geração de dummy text
\usepackage{mathptmx}
\usepackage[bottom=2cm,top=3cm,left=3cm,right=2cm]{geometry}
@Adejair
Adejair / hashtabletimers.js
Created June 5, 2019 11:58
hashtable_with_timers
const SimpleHashTable = require('simple-hashtable')
, hashtable = new SimpleHashTable()
, hashtableData = new SimpleHashTable();
let tick = 0;
hashtableData.put('timer_c201a', {
ofertaId: 'timer_c201a',
time: 1,
@Adejair
Adejair / table.tex
Created May 27, 2019 22:39
Latex Table
\documentclass[xcolor=table]{beamer}
\usepackage{multirow}
\usepackage[table]{xcolor}
\begin{document}
\begin{table}[]
\begin{tabular}{|l|l|l|}
\hline
~ ~ ~ ~ ~ ~ & ~ ~ ~ ~ ~ ~ & ~ ~ ~ ~ ~ ~ {\color[HTML]{333333} } \\ \hline
@Adejair
Adejair / convertStringDateToDate.js
Created May 16, 2019 18:46
Converter String Date to Date
_convertStringDateToDate(stringDate: string) {
const DATE = 1;
const MONTH = 2;
const YEAR = 3;
let regex = /^([0-9]{0,1}[0-9]).* (\w[a-z]{3,15}).*([0-9]{4,})/.exec(stringDate);
let convertMonthToNumber = moment().locale('pt-br').month(regex[MONTH]).format("M");
return new Date(`${regex[YEAR]}-${convertMonthToNumber}-${regex[DATE]}`);
}