Skip to content

Instantly share code, notes, and snippets.

Avatar

Felipe Venturino venturion

View GitHub Profile
@venturion
venturion / baixar_arquivos_do_repositorio_remoto.txt.txt
Last active Oct 18, 2020 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
View baixar_arquivos_do_repositorio_remoto.txt.txt
git fetch --all
git reset --hard origin/master
git pull origin master
View remover_duplicados_array_es6_set.js
// Dados duplicados
const arrayData = [1,2,4,4,4,4,3,3,5,6,8]
const noDuplicates = function (arrayData) {
// Transformo em Set e depois converto para Array novamente sem as duplicatas
return [...new Set(arrayData)]
}
console.log(noDuplicates(arrayData))
View cidades-municipios-brasileiros.json
This file has been truncated, but you can view the full file.
[{
"codigo_ibge": 5200050,
"nome": "Abadia de Goiás",
"latitude": -16.7573,
"longitude": -49.4412,
"capital": false,
"codigo_uf": 52,
"uf": "GO"
}, {
View estados-brasileiros.json
[{
"codigo_uf": 11,
"uf": "RO",
"nome": "Rondônia"
}, {
"codigo_uf": 12,
"uf": "AC",
"nome": "Acre"
}, {
"codigo_uf": 13,
View math-captcha.js
/* Inicialização */
var mathCaptcha = new MathCaptcha({
selector: '#form'
})
/* Default parameters */
MathCaptcha.defaults = {
selector: '[name=form]',
inputClass: 'form-control',
inputName: 'captcha',
View magento_2_cron_jobs.txt
#cron jobs
php /caminho/para/seu-site/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /caminho/para/seu-site/var/log/magento.cron.log
php /caminho/para/seu-site/update/cron.php >> /caminho/para/seu-site/var/log/update.cron.log
php /caminho/para/seu-site/bin/magento setup:cron:run >> /caminho/para/seu-site/var/log/setup.cron.log
View scale-tiles-bugfix.js
/*
* Fix the transform scale tiles bug in css
*/
function fixTiles (element, zIndex = 999) {
const element = $(element)
element.on('mouseover', (e) => {
element.css({
'z-index': 0
})
You can’t perform that action at this time.