Skip to content

Instantly share code, notes, and snippets.

View wilcorrea's full-sized avatar
🚀
// TODO: be life good

William Correa wilcorrea

🚀
// TODO: be life good
View GitHub Profile
@wilcorrea
wilcorrea / ShortIntroToScraping.rst
Created February 5, 2019 22:05 — forked from bradmontgomery/ShortIntroToScraping.rst
Really short intro to scraping with Beautiful Soup and Requests
@wilcorrea
wilcorrea / teste.js
Last active March 25, 2020 11:41
resolvers
import { dateFormat } from '@/sgu-glp/src/utils/date';
const applyDateFormat = dateFormat();
const formatDates = (data, keys) => {
fields.forEach(key => {
data[key] = applyDateFormat(data[key])
})
return data
}
const dadosGerais = data => ({
@wilcorrea
wilcorrea / index.php
Last active August 20, 2018 18:08 — forked from raingrave/index.php
<?php
require __DIR__ . '/../vendor/autoload.php';
$dispatcher = FastRoute\simpleDispatcher(function(FastRoute\RouteCollector $router) {
$router->get('/products', function(){
return 'This route responds to requests with the GET method at the path /example';
});
});
@wilcorrea
wilcorrea / guia-de-estudos-js.md
Created July 17, 2018 14:33 — forked from vinicius73/0-contribua-.md
Guia de referencias sobre estudo de JavaScript

Guia de referencias sobre estudo de JavaScript

Tópicos de estudo para JavaScript

Base JS

  • Lexical Scope (Escopo Léxico)
  • Prototype chain (Herança e cadeia de protótipos)
  • Funções Construtoras
  • ES6 Class
export default (enable = false) => {
function log (type, ...args) {
if (enable) {
console[type](this.$_id, ...args, Date.now(), this.$el)
}
}
return {
created () {
this.$_id = `${this.$options.name}-${this.$hashids.encode(Date.now())}`
@wilcorrea
wilcorrea / logger.js
Created July 10, 2018 18:08 — forked from luiguild/logger.js
Simple logger module and VuePlugin that check NODE_ENV to show console.log()
const prefix = process.env.PREFIX
const nodeEnv = process.env.NODE_ENV
let logCounter = 0
let errorCounter = 0
let fatalCounter = 0
let warnCounter = 0
export const vLogger = {
install (Vue, options) {
<?php
try {
$tr_elements = $crawler2->filterXPath('//table/tr');
$result = $crawler2->filter('#ctl00_ContentPlaceHolder1_dlResultados')->html();
$crawler3 = new Crawler($result);
data:()=> ({
tituloStatus:null,
somenteLeitura:false,
listaSistema: [],
nomeListaPesquisa:'listaSistema',
complementoUrlState:'perfil',
descricaoState: 'Perfil',
getterTempVuex: 'GET_PERFIL_TEMP',
buscaBanco: 'perfis',
perfil: {
export default function (value) {
const formatted = Number(value)
.toFixed(2)
.replace('.', ',')
.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1.")
return `R$ ${formatted}`
}
@wilcorrea
wilcorrea / Git push deployment in 7 easy steps.md
Created May 10, 2018 02:34 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook