Skip to content

Instantly share code, notes, and snippets.

View trinaldi's full-sized avatar
🏠
Working

Tiago Rinaldi trinaldi

🏠
Working
View GitHub Profile
@trinaldi
trinaldi / match_repos.md
Created December 6, 2017 18:57
Match forked repo to original repo
git remote add upstream https://github.com/some_user/some_repo
git fetch upstream
git checkout master
git reset --hard upstream/master  
git push origin master --force
@trinaldi
trinaldi / bolao.py
Created June 25, 2018 20:35
Bolão Tios do Peidinho
#!/usr/bin/env python
from colorama import Fore, Style
import requests, bs4, sys
try:
r = requests.get('http://www.maisbolao.com.br/bolao/classificacao/35614/grande-bolao-tios-do-peidinho-014-e-nois', timeout=30)
except:
print("Tentei por 30 segundos e nada...")
sys.exit(1)
@trinaldi
trinaldi / index.html
Last active April 6, 2019 02:18
Action when element exists
<div id="div1" class="select"><p>Mensagem de Sucesso</p></div>
<button id="div2" class="select"><p>Comprar algo</p></button>
## Maintainer: Jaja <[email protected]>
## Co-Maintainer: floriplum <[email protected]>
## Co-Maintainer: various people submitting to 'chaotic-aur' repo
## Credits: barfin (aka RogueGirl) <[email protected]>
## Linted using:
## $ shellcheck PKGBUILD -e SC2034,SC2148,SC2154
## Formated using:
## $ shfmt -w PKGBUILD
(function(__wpcc){var aa;"undefined"===typeof aa&&(aa=function(){});aa.p="";}).call(this || window, (window.__wpcc = window.__wpcc || {}));
(function(__wpcc){var g=function(a){return a.replace(/["]/g,b=>ba[b])},k=function(a){return a.replace(/&quot;/g,b=>Object.keys(ba).find(c=>ba[c]===b)||"")},ca=function(a){return a.map(b=>b.replace(/\s\s+/g," "))},m=function(a,...b){a=[ca(a),b].reduce((c,d)=>(d.forEach((e,f)=>(c[f]=c[f]||[]).push(e)),c),[]).reduce((c,d)=>c.concat(d));return document.createRange().createContextualFragment(a.flat().join(""))},p=function(a,...b){return[ca(a),b].reduce((c,d)=>(d.forEach((e,f)=>(c[f]=c[f]||[]).push(e)),c),[]).reduce((c,
d)=>c.concat(d)).flat().join("")},ha=function(a,b){{const d=da[ea];a=d&&d[a]&&d[a][b]?d[a][b]:0}var c;return{currencyCode:(null===(c=fa[ea])||void 0===c?void 0:c.currencyCode)||"",units:a,nanos:0}},ia=async function(a){return new Promise((b,c)=>{const d=setTimeout(()=>{clearTimeout(d);c(Error("Timeout"))},a)})},ja=function(a,b=50,c={}){function d(...x){const K=