Skip to content

Instantly share code, notes, and snippets.

View jonathands's full-sized avatar

Jonathan DS jonathands

View GitHub Profile
@jonathands
jonathands / personal_claude.MD
Last active September 28, 2025 21:51
Guidelines for AI

Guidelines

We will be developing a big range of projects, please only follow the rules if the projects fit especifically the Type described, follow the rules unless specified otherwise by the prompt or the projects CLAUDE.md

GENERAL

  • AVOID USING EMOJI
  • When working with GitHub repositories from the user jonathands, always use the alias 'githubmy' for the remote (e.g., git@githubmy:jonathands/repo-name.git)
  • Do NOT add any mention of Claude, Claude Code, or co-authoring attribution to PRs, Issues, or Commits
  • Don't add long code sessions to documentation, unless asked to provide examples
@jonathands
jonathands / git-hub-aliases.md
Created September 24, 2025 13:59
My Git Aliases

[alias] history = log --oneline --graph --decorate --all reset-with-prejudice = reset --hard kill-branch = branch -D

@jonathands
jonathands / bashrc
Last active June 2, 2025 16:54
merge a feature branch and get back
# On ~/.bashrc or equivalent
# usage
# gmergehml tries to merge current branch and gets back
# gmergehml name/ofbranch specify a branch
gmergehml() {
local feature_branch="${1:-$(git rev-parse --abbrev-ref HEAD)}"
read -p "Merge branch '$feature_branch' into 'homolog'? [y/N] " answer
case "$answer" in
[Yy]* )
@jonathands
jonathands / warp-toggler-install
Created May 30, 2025 13:17
Script to install an Easy to access button to toggle CloudFlare Warp VPN
#!/bin/bash
# Create toggle script in /usr/bin
echo "Creating /usr/bin/warp-toggle..."
sudo tee /usr/bin/warp-toggle > /dev/null << 'EOF'
#!/bin/bash
STATUS=$(warp-cli -j status | grep -o '"status":[ ]*"[^"]*"' | cut -d'"' -f4)
if [ "$STATUS" = "Connected" ]; then
warp-cli -j disconnect
@jonathands
jonathands / checklist-pt_br.md
Last active May 9, 2025 16:54
Understanding and Mitigating the Androxgh0st and similar malware threat

🔐 Entendendo e Mitigando a Ameaça do Malware Androxgh0st

Como o Androxgh0st Funciona

O Androxgh0st atinge principalmente aplicações Laravel, um dos principais frameworks PHP usados em muitos sites. Ao escanear arquivos .env, o malware consegue identificar e extrair informações sensíveis, especialmente credenciais de acesso a plataformas como a Amazon Web Services (AWS).

O funcionamento do Androxgh0st ocorre em várias fases:

Etapa 1: Varredura com Botnet

O Androxgh0st utiliza uma botnet para procurar por sites que utilizam Laravel. Isso gera uma lista de possíveis alvos.

@jonathands
jonathands / gist:d48d22aaebc54dac5415a7c6cfca0e6c
Last active May 4, 2025 00:44
install cloudflare warp on mint
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ jammy main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
## force Jammy
sudo apt-get update && sudo apt-get install cloudflare-warp
warp-cli registration new
warp-cli connect

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@jonathands
jonathands / gist:03a449740ce72acbc68b8d1e6f6aa7ef
Last active September 27, 2024 01:22
extrair dados registro.br
// === Global Variables ===
var siteResults = {};
var isPaused = false;
var pausePromiseResolve;
// === Function to Export siteResults as CSV ===
function exportSiteResultsAsCSV(siteResults) {
// Create the CSV headers
var csvContent = 'Site,Domain Info,DNS Info,Error\n';
@jonathands
jonathands / README.md
Created September 20, 2024 12:59 — forked from dpaluy/README.md
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!