Skip to content

Instantly share code, notes, and snippets.

View gabrielbalog's full-sized avatar

Gabriel Balog gabrielbalog

  • São Paulo, Brazil
View GitHub Profile
SwipeRight = setInterval(function () {
var Like = document.getElementsByClassName("button Lts($ls-s) Z(0) CenterAlign Mx(a) Cur(p) Tt(u) Bdrs(50%) P(0) Fw($semibold) focus-button-style Bxsh($bxsh-btn) Expand Trstf(e) Trsdu($normal) Wc($transform) Pe(a) Scale(1.1):h Scale(.9):a Bgc($c-like-green):a");
Like[0].click();
}, 2000)
@gabrielbalog
gabrielbalog / python_decorator_guide.md
Created March 13, 2020 16:06 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

sudo apt install git libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev -y && git clone https://www.github.com/Airblader/i3 i3-gaps && cd i3-gaps && autoreconf --force --install && rm -rf build/ && mkdir -p build && cd build/ && ../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers && make && sudo make install
sudo apt-get install cmake cmake-data libcairo2-dev libxcb1-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev libxcb-util0-dev libxcb-xkb-dev pkg-config python-xcbgen xcb-proto libxcb-xrm-dev libasound2-dev libmpdclient-dev libiw-dev libcurl4-openssl-dev libpulse-dev libxcb-composite0-dev xcb libxcb-ewmh2 -y && git clone https://github.com/jaagr/polybar.git && cd polybar && sudo ./build.sh
sudo chown -R $USER:$USER
@gabrielbalog
gabrielbalog / Node
Last active February 12, 2018 18:12
def _prepare_edoc_vals(self, inv, inv_lines):
res = super(AccountInvoice, self)._prepare_edoc_vals(inv, inv_lines)
if res.get('nfse_eletronic'):
res['nfse_eletronic'] = inv.nfse_eletronic
res['ambiente_nfse'] = 'homologacao' \
if inv.company_id.tipo_ambiente_nfse == '2' else 'producao'
res['serie'] = inv.service_serie_id.id
res['serie_documento'] = inv.service_serie_id.code
res['model'] = inv.service_document_id.code
res['numero'] = inv.service_serie_id.internal_sequence_id.next_by_id()