Skip to content

Instantly share code, notes, and snippets.

View paulera's full-sized avatar

Paulo Amaral paulera

View GitHub Profile
@paulera
paulera / site-blocker.js
Created April 9, 2020 11:36
Site blocker for working focused
blacklisted = [
'facebook.com',
'www.facebook.com'
];
if (blacklisted.includes(window.location.hostname)) {
now = new Date();
strNow = now.getHours().toString().padStart(2, '0') + ':' + now.getMinutes().toString().padStart(2, '0')
workTime = [ '09:00', '18:00' ]
if (strNow >= workTime[0] && strNow <= workTime[1]) {
@paulera
paulera / stapleablebook.py
Created February 17, 2020 14:58
Reorder pages of a PDF file so you can print as a staple-able book
"""
This script will take a PDF file set in the input_file variable and create a file
with similar name but endind with "-stapleablebook.pdf".
To create a A5 sized book, print the resulting file as described below and fold the
whole block of paper in the middle. You can staple it in the middle to create your book.
Printer configuration:
- Pages per sheet = 2
- Twol-sided = Print on both sides
@paulera
paulera / Text Highlight.md
Last active October 16, 2020 09:06
Colors to use for highlighting text in a white background. Useful for documentation.

Highlighting pallete

  • #ffcc00
  • #ffccff
  • #00ccff
  • #ccff00
  • #ffffaa
  • #aaffaa
@paulera
paulera / Scrum Guide Summary.md
Last active February 2, 2024 15:53
A summary of the Scrum Guide to assist studying.

❌✋ Stop!

This summary is outdated!

It was written based on the 2017 version of the Scrum Guide and is pending update to reflect what is in the 2020 versions.


Scrum Guide summary

This is a compilation (aka: my study notes) of key points taken from the Scrum Guide by Jeff Sutherland and Ken Schwaber. The sections below are organised the same ways as in the guide.

@paulera
paulera / dislike-all-comments.js
Last active September 13, 2019 01:09
Snippet to dislike all comments in a Youtube video
/**
* 1. Open a youtube video
* 2. Keep scrolling down unitl all comments are shown
* 3. Right click
* 4. Select inspect
* 5. Open the Console tab
* 6. Copy and paste the code below and press enter
**/
document.querySelectorAll("ytd-toggle-button-renderer#dislike-button").forEach(function(elem) { elem.click(); });
document.getElementById('ghx-header').style.display = 'none';
document.getElementById('ghx-quick-filters').style.display = 'none';
document.getElementById('navigation-app').style.display = 'none';
// document.getElementById('gh').style.height = '100%';
// document.getElementById('ghx-content-main').style.height = '100%';
// document.getElementById('ghx-rabid').style.height = '100%';
document.getElementById('ghx-plan').style.height = '100%';
document.getElementById('ghx-plan-group').style.height = '100%';
/**
* Make this program to print 13 making changes ONLY the body of the "function" function
* You are NOT ALLOWED to change NOTHING in the "main" function
*/
void function() {
/* EDIT ONLY HERE */
}
int main() {
@paulera
paulera / commit_message.md
Created May 22, 2019 10:01 — forked from lucasmezencio/commit_message.md
Como escrever a mensagem de um commit

As mensagens dos commits devem servir para três importantes coisas:

  • Para acelerar o processo de revisão.
  • Para ajudar a escrever uma boa nota de lançamento.
  • Para ajudar os futuros mantenedores (que pode ser você), ou ajudar a descobrir porque uma mudança foi feita no código ou porque uma funcionalidade foi adicionada.

Escreva sua mensagem de commit desta forma:

@paulera
paulera / commit_message.md
Created May 22, 2019 10:01 — forked from lucasmezencio/commit_message.md
Como escrever a mensagem de um commit

As mensagens dos commits devem servir para três importantes coisas:

  • Para acelerar o processo de revisão.
  • Para ajudar a escrever uma boa nota de lançamento.
  • Para ajudar os futuros mantenedores (que pode ser você), ou ajudar a descobrir porque uma mudança foi feita no código ou porque uma funcionalidade foi adicionada.

Escreva sua mensagem de commit desta forma:

@paulera
paulera / youtube_ad_skipper.js
Last active September 16, 2021 12:25
Close youtube ads as soon as they show (video ads and banners)
// ==UserScript==
// @name AdSkipper
// @namespace https://gist.github.com/paulera/671daf5b9a5f6502697359941ba524dc
// @version 1.3
// @description Skip youtube ads automatically
// @author paulera
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==