Skip to content

Instantly share code, notes, and snippets.

View jsilva74's full-sized avatar
💻

José Silva Jr. jsilva74

💻
  • Rio de Janeiro, RJ, Brasil
View GitHub Profile
@aidos-dev
aidos-dev / README.md
Last active December 28, 2025 22:23
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@stephenbradshaw
stephenbradshaw / https_server_python3.py
Last active January 2, 2026 03:51
Python 3 Simple HTTPS server (versions for above and below python3.7 and helper script to generate certificate)
#!/usr/bin/env python
import http.server
import ssl
# Create certifcate and key: https://github.com/stephenbradshaw/pentesting_stuff/blob/master/example_code/create_self_signed_https_certs.py
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.load_cert_chain(certfile="https_self_signed_cert.pem", keyfile="https_self_signed_key.pem")
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler)
@gpoole
gpoole / tampermonkey-hide-youtube-comments.js
Last active June 13, 2025 07:53
🚨 OUTDATED AND BROKEN ON CURRENT DESIGN 🚨 Tampermonkey userscript to hide comments on YouTube with a toggle on/off button
// ==UserScript==
// @name Hide YouTube comments
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hides YouTube comments.
// @author gpoole
// @match https://www.youtube.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
@dillonstreator
dillonstreator / crumby.js
Last active November 2, 2024 11:56
Javascript generate breadcrumb array from url pathname
const titleizeWord = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
const kebabToTitle = (str) => str.split("-").map(titleizeWord).join(" ");
const toBreadcrumbs = (pathname, { rootName = "Home", nameTransform = s=>s } = {}) =>
pathname
.split("/")
.filter(Boolean)
.reduce(
(acc, curr, idx, arr) => {
acc.path += `/${curr}`;
@mort3za
mort3za / git-auto-sign-commits.sh
Last active December 11, 2025 14:52
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@brunopinheiro
brunopinheiro / Instructions.md
Last active February 26, 2024 14:10
Empty Trash AppleScript

Empty Trash AppleScript

Using as an Application

When you save the script as an application, you can use it with Spotlight!

  1. Open Automator
  2. Create new Application
  3. Drag the Run Applescript action
  4. Type the script
  5. Save as Empty Trash
@joaohcrangel
joaohcrangel / validation-cpf.ts
Last active October 14, 2025 00:37
Função para validar CPF em TypeScript
function isValidCPF(value: string) {
if (typeof value !== 'string') {
return false;
}
value = value.replace(/[^\d]+/g, '');
if (value.length !== 11 || !!value.match(/(\d)\1{10}/)) {
return false;
}
@markreid
markreid / gitflowrebasing.md
Created January 17, 2017 04:30
git flow with rebasing
{
"UF": [
{"nome": "Acre", "sigla": "AC"},
{"nome": "Alagoas", "sigla": "AL"},
{"nome": "Amapá", "sigla": "AP"},
{"nome": "Amazonas", "sigla": "AM"},
{"nome": "Bahia", "sigla": "BA"},
{"nome": "Ceará", "sigla": "CE"},
{"nome": "Distrito Federal", "sigla": "DF"},
{"nome": "Espírito Santo", "sigla": "ES"},
@edirpedro
edirpedro / estados-brasil.php
Last active December 16, 2025 19:08
Estados do Brasil (Lista, Array)
// Lista
AC, Acre
AL, Alagoas
AP, Amapá
AM, Amazonas
BA, Bahia
CE, Ceará
DF, Distrito Federal
ES, Espirito Santo