Skip to content

Instantly share code, notes, and snippets.

Paulo Amaral paulera

  • Malta
Block or report user

Report or block paulera

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulera
paulera / site-blocker.js
Created Apr 9, 2020
Site blocker for working focused
View site-blocker.js
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 Feb 17, 2020
Reorder pages of a PDF file so you can print as a staple-able book
View stapleablebook.py
"""
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 Nov 4, 2019
Colors to use for highlighting text in a white background. Useful for documentation.
View Text Highlight.md
@paulera
paulera / Scrum Guide Summary.md
Last active May 25, 2020
A summary of the Scrum Guide to assist studying.
View Scrum Guide Summary.md
@paulera
paulera / dislike-all-comments.js
Last active Sep 13, 2019
Snippet to dislike all comments in a Youtube video
View dislike-all-comments.js
/**
* 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(); });
View smart_bookmark_jira_presentation_mode.js
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%';
View problema_c.cpp
/**
* 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 — forked from lucasmezencio/commit_message.md
Como escrever a mensagem de um commit
View commit_message.md

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 — forked from lucasmezencio/commit_message.md
Como escrever a mensagem de um commit
View commit_message.md

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 Jan 4, 2020
Youtube Ad Skipper: closes youtube ads as soon as they show (video ads and banners)
View youtube_ad_skipper.js
// ==UserScript==
// @name AdSkipper
// @namespace https://gist.github.com/paulera/671daf5b9a5f6502697359941ba524dc
// @version 1.2
// @description Remove Youtube annoying stuff automatically
// @author paulera
// @match https://www.youtube.com/watch*
// @grant none
// ==/UserScript==
You can’t perform that action at this time.