Skip to content

Instantly share code, notes, and snippets.

Paulo Henrique Deléo paulodeleo

  • Curitiba - PR, Brazil
Block or report user

Report or block paulodeleo

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
wjladams /
Created Apr 9, 2018
xubuntu reverse scrolling
# Find the amount by doign
# synclient | grep HorizScrollDelta
# synclient | grep VertScrollDelta
# And then simply negative that value for this
# Found at
# This is because, although xubuntu 18.04 has reverse scrolling option in touchpad
# settings, it doesn't really work, the setting does not cascade to gnome apps for some reason.
synclient HorizScrollDelta=-116
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
hemenkapadia / Ubuntu 14.04 on Optimus Laptop.txt
Last active May 23, 2018
[Ubuntu 14.04 on Optimus Laptop] Setting up Ubuntu 14.04 with nvidia drivers and CUDA on Dell 7559 Optimus laptop #Ubuntu #Nvidia #CUDA #setup
View Ubuntu 14.04 on Optimus Laptop.txt
### NOTE ###
The below gist is converted to a blog post and available at below link. Refer that instead.
#### Note about kernel versions ####
Between kernel versions 4.2 and 4.4 there are different options that need to bet set
to get this working. The same is highlighted below when necessary. I have not tested
maxogden /
Last active Aug 5, 2019
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

TobiasWooldridge / gist:22f0cdca75190b9a473f
Last active Jul 1, 2019
How to Unbrick a Kindle Paperwhite
View gist:22f0cdca75190b9a473f

How to unbrick an Amazon Kindle Paperwhite™

This guide instructs you in how to unbrick an Amazon Kindle Paperwhite. The consequences of following it are your own responsibility. This method (opening the Kindle and using the serial interface) should be a last resort and should only be considered if other methods fail

The Guide

  1. Pry open Kindle using a prying tool
  2. Unscrew the screen and remove it from the base. Note that there's a screw hidden under the adhesive at the top in the middle
  3. Solder tin wire to serial ports on the bottom
  4. Attach tin wire to USB TTY device (order is ground, RX, TX, from the kindle's perspective, where GND is the smallest pad) and plug USB TTY device into your computer
  5. Open Putty on your computer in serial mode, with the serial port specified as your USB device and baud configured to 115200
blacktm /
Last active Aug 14, 2019
A Bash script to install Ruby 2.6 on the Raspberry Pi (Raspbian)
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.6 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
# Run from the web:
# bash <(curl -s
# --------------------------------------------------------------------------------------------
# Welcome message
chambs / gist:5934429
Last active Apr 16, 2019
Code Review
View gist:5934429

###Code Review

É uma técnica onde o desenvolvedor tem seu código revisado por outro desenvolvedor antes de commitar o código.

O commitador deve explicar cada arquivo que está sendo commitado, tanto do ponto de vista técnico quanto de negócio.

Cada trecho de código apontado como alteração pelo "diff" deve ser devidamente explicado ao revisor.

É papel do revisor questionar sobre o código, sugerir melhorias e exigir detalhes sobre a regra de negócio.

erikhenrique /
Last active Jul 23, 2019
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
jmnwong / ST2 Cycle Tabbing
Created Jun 28, 2013
Makes CTRL-Tab cycle tabs in order for Sublime Text.
View ST2 Cycle Tabbing
Put in (Preferences -> Key Bindings - User):
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
You can’t perform that action at this time.