Skip to content

Instantly share code, notes, and snippets.

View ggteixeira's full-sized avatar
Studying NodeJS!

Gui Teixeira ggteixeira

Studying NodeJS!
View GitHub Profile
@ggteixeira
ggteixeira / exif.sh
Created October 6, 2023 13:54
Fixing Metadata from Image Files
exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json <DirToProcess>
@ggteixeira
ggteixeira / userChrome.css
Created February 13, 2022 20:34
Remove "back" and "forward" buttons using usrChrome.css in Firefox
#back-button, #forward-button { display:none!important; }
@ggteixeira
ggteixeira / pacman-packages.txt
Created July 13, 2021 17:43
Listing and installing repo packages and foreign packages
pacman -Qeqm > foreign_pkgs
# after reinstall
git clone aur.archlinux.org/yay.git
pushd yay
makepkg -si
popd
yay -S - < foreign_pkgs
***
@ggteixeira
ggteixeira / auto-tab-discard-preferences.json
Created April 12, 2021 15:29
Auto Tab Discard Preferences (Firefox Extension)
{
"chrome.storage.local": {
"audio": true,
"battery": false,
"check-delay": 30000,
"click": "click.popup",
"faqs": true,
"favicon": true,
"favicon-delay": 500,
"form": true,
@ggteixeira
ggteixeira / force_ipv4_connection
Created March 24, 2021 15:16
Forçar conexão IPV4 (Chaves SSH Linux)
# Entrar em /etc/ssh/ssh_config
sudo vim /etc/ssh/ssh_config
# Adicionar o Bitbucket como Host e forçar a conexão IPV4 nele
Host bitbucket.org
AddressFamily inet
@ggteixeira
ggteixeira / append_textfiles.txt
Last active August 11, 2020 18:55
Pegar todo o conteúdo de várias pastas e anexar tudo num só arquivo
cat pasta_numero_*/*.txt > arquivo_alvo.txt
@ggteixeira
ggteixeira / filterBy.js
Last active July 25, 2020 01:55
filterBy.js
// Criar um filtro por chave e valor sem usar a função filter
function filterBy(key, value, array) {
const filteredList = []
if (!key || !value) {
console.log("Key ou value é falso")
return filteredList
}
if (!Array.isArray(array) || array.length == 0) {
@ggteixeira
ggteixeira / filter_by.js
Last active August 6, 2021 21:53
filterBy() function
// Criar um filtro por chave e valor sem usar a função filter
function filterBy(key, value, array) {
const filteredList = [];
array.map((carro) => {
if (!!key || !!value) {
if (carro[key] == value) {
filteredList.push(carro);
}
}
@ggteixeira
ggteixeira / filter-3-grams
Created June 19, 2020 00:20
Filtrando 3-gramas no Vim
# Filtrando trigramas
:v/^\w* \(com\|como\|da\|das\|de\|do\|dos\|em\|na\|no\|o\|os\|ou\|pela\|pelos\|por\) \w*/d
@ggteixeira
ggteixeira / divertimento_10-12.py
Created May 4, 2020 03:28
divertimento 10.12 (OOP Menees)
class Cliente:
def __init__(self, nome, telefone):
self.nome = nome
self.telefone = telefone
class Conta:
def __init__(self, clientes, numero, saldo=0):
self.clientes = clientes
self.numero = numero