Skip to content

Instantly share code, notes, and snippets.

View paulera's full-sized avatar

Paulo Amaral paulera

View GitHub Profile
@paulera
paulera / python-on-dreamhost-shared.md
Last active March 22, 2024 05:10
Setup a decent environment on Dreamhost Shared Hosting for running python applications

I use Dreamhost shared hosting and everytime I wanto to setup a python website/api/whatever, I struggle crawling over a number of pages for installation instructions and troubleshooting, so I decided to compile myself a guide to get it done properly from scratch.

This manual is in development. I will write it as I go through issues.

Environment setup

Enable Passenger in the Dreamhost Shared domain

@paulera
paulera / gdevelop5_board-walk-with-raycast.json
Last active June 21, 2020 01:24
Example of how to implement a board game of arbitrary shape in GDevelop 5, based on tiles placement. See more: https://paulera.itch.io/board-walk-with-raycast
{
"firstLayout": "",
"gdVersion": {
"build": 98,
"major": 4,
"minor": 0,
"revision": 0
},
"properties": {
"adMobAppId": "",
@paulera
paulera / como-tirar-psm-I-scrum-org.md
Last active November 16, 2023 02:08
Como tirar a certificacao Agil PSM 1 da Scrum.org

Como tirar a certificacao Agil PSM I (scrum.org)

Algumas pessoas me perguntam sobre certificaoes do Scrum.org: o que estudar, como aplicar para a prova e conselhos para realiza-la. Por isso, resolvi escrever este artigo bem pratico sobre a certificacao PSM I (Professional Scrum Master). Com disciplina, em torno de um mes voce estara no ponto para fazer a prova, sem ter que gastar uma fortuna com cursos.

Recebi essas recomendacoes de colegas de trabalho que sao agile coaches extremamente experientes e competentes. Funcionaram muito bem pra mim e espero que ajudem igualmente quem ler este texto.


Formato da prova

@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 7, 2025 04:50
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%';