Skip to content

Instantly share code, notes, and snippets.

View paulofellix's full-sized avatar

Paulo Félix paulofellix

  • PF Labs
  • Manaus, AM - Brasil
View GitHub Profile
@paulofellix
paulofellix / postman-update.sh
Created July 27, 2023 03:00 — forked from lira/postman-update.sh
Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
@paulofellix
paulofellix / keyboard.md
Created October 6, 2022 17:43 — forked from ericdouglas/keyboard.md
Cedilla under C (ç) in 'US international' keyboard layout in Linux

Add English (US, alt. intl.)

It's because the cedilla module isn't loaded by default when the locale is set to en, so you have to change the configuration files for gtk to add them:

  1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
@paulofellix
paulofellix / AuthyToOtherAuthenticator.md
Created September 27, 2021 15:41 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@paulofellix
paulofellix / jquery.waituntilexists.js
Created July 21, 2020 16:39 — forked from md55/jquery.waituntilexists.js
bugfix: if handler do waituntilexists() again with same selector then new IntervalId will replace old one in intervals array before removeListener() call. So new Interval will be cleared instead of old, and old Interval will never be cleared.
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@paulofellix
paulofellix / GUID.es6.js
Last active October 8, 2020 21:28 — forked from suissa/cpf.validate.final.js
[JS Util Functions] #javascript
function CreateUUID() {
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
)
}
@paulofellix
paulofellix / certificate.sh
Created February 14, 2019 21:30 — forked from WebReflection/certificate.sh
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@paulofellix
paulofellix / update-gitkraken.sh
Last active June 4, 2018 18:25 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 25 + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/gitkraken
cd /opt
#!/bin/sh
# Sublime Text 3 Install (last update: Monday 13 March 2017)
#
# No need to download this script, just run it on your terminal:
#
# curl -L git.io/sublimetext | sh
# Detect the architecture
@paulofellix
paulofellix / git-rebase_format-branch_examples.sh
Created February 17, 2017 22:24 — forked from gustavomdsantos/git-rebase_format-branch_examples.sh
Git rebase, format-branch command examples
git rebase -i 1ec6d533d8555bbe72cec3881aba8a4433044a2a # SHA hash do commit "HEAD temporário" (commit anterior ao desejado para modificar!)
git log --format=fuller #Ver todos os commits com todas as informações
# "Commit amending" com mesmo autor (dentro de um "edit" do Rebase)
GIT_COMMITTER_DATE="Mon Apr 20 18:54:39 2015 -0300" git commit --date="Mon Apr 20 18:54:39 2015 -0300" --amend
# "Commit amending" com autor diferente (dentro de um "edit" do Rebase)
GIT_COMMITTER_NAME="Username desejado como exibido no git log" GIT_COMMITTER_EMAIL="[email protected]" GIT_COMMITTER_DATE="Fri May 22 00:52:37 2015 -0300" git commit --author="Username desejado como exibido no git log <[email protected]>" --date="Fri May 22 00:52:37 2015 -0300" --amend
@paulofellix
paulofellix / IntelliJ_IDEA__Perf_Tuning.txt
Created January 19, 2017 16:19 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1