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
wjladams / fixscroll.sh
Created Apr 9, 2018
xubuntu reverse scrolling
View fixscroll.sh
#!/bin/sh
# Find the amount by doign
# synclient | grep HorizScrollDelta
# synclient | grep VertScrollDelta
# And then simply negative that value for this
# Found at
# https://askubuntu.com/questions/690512/how-to-enable-natural-scrolling-in-xfce4/853262
# 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
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

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

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
@hemenkapadia
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.
http://hemenkapadia.github.io/blog/2016/11/11/Ubuntu-with-Nvidia-CUDA-Bumblebee.html
#### 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
maxogden / 0.md
Last active Aug 5, 2019
JS hoisting by example
View 0.md

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
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
blacktm / install_ruby_rpi.sh
Last active Aug 14, 2019
A Bash script to install Ruby 2.6 on the Raspberry Pi (Raspbian)
View install_ruby_rpi.sh
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.6 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
@chambs
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
erikhenrique / bin-cc.md
Last active Jul 23, 2019
Bin de cartões de crédito para validação
View bin-cc.md

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
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.