Skip to content

Instantly share code, notes, and snippets.

View guicaulada's full-sized avatar

Guilherme Caulada guicaulada

View GitHub Profile
@guicaulada
guicaulada / find-malicious-npm.sh
Last active September 16, 2025 03:23
Find malicious NPM packages on any node_modules folder in the system
#!/bin/bash
# Function to display a spinner
spinner() {
local pid=$1
local delay=0.1
local spinstr='|/-\'
while kill -0 $pid 2>/dev/null; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
@guicaulada
guicaulada / cloudSettings
Last active December 16, 2022 16:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-12-16T16:22:02.205Z","extensionVersion":"v3.4.3"}
@guicaulada
guicaulada / Mac Launchpad Scripts
Last active May 20, 2022 22:52
Scripts with SQLite Commands for Mac Launchpad
Mac Launchpad Scripts
@guicaulada
guicaulada / deleteMessages.js
Created February 20, 2022 07:09
Delete messages from users that left your server
async function clearMessages(server, channel, author, offset=0) {
const authToken = 'YOUR_DISCORD_TOKEN';
const headers = { 'Authorization': authToken, 'Content-Type': 'application/json' };
const baseURL = `https://discordapp.com/api/v6/channels`;
let searchURL = `https://discordapp.com/api/v6/guilds/${server}/messages/search?channel_id=${channel}&offset=${offset}&include_nsfw=true`;
let clock = 0;
let interval = 2000;
function delay(duration) {
return new Promise((resolve, reject) => {
@guicaulada
guicaulada / pictureInPicture.js
Last active February 20, 2022 06:41
Remove discord picture in picture
$("[class^=pictureInPicture]").remove()
!.gitignore
!.htaccess
!.htpasswd
%20../
%2e%2e//google.com
%3f/
%EXT%
%ff/
..;/
.7z
@guicaulada
guicaulada / functions.js
Last active December 24, 2020 01:08
Discord Console Functions
// Use CTRL + SHIFT + I to open Discord Developer Console
let _$$ = $$ // Setup jQuery
// Forever utilities
let forevers = {}
let startForever = async (id, f, t) => {
f()
forevers[id] = setTimeout(() => startForever(id, f, t), t)
}
@guicaulada
guicaulada / i3cpu.sh
Last active October 6, 2020 02:30
i3status
#!/usr/bin/bash
while true
do
cat /proc/cpuinfo | grep 'cpu MHz' | awk '{sum+=$NF} END{printf "%.0f\n", sum/NR}' > /home/sighmir/.i3/cpu_speed
sleep 1
done
@guicaulada
guicaulada / vban_listen.sh
Created March 31, 2020 02:43
Screen and audio streaming using vban, ffmpeg and mpv. Download vban from: https://github.com/quiniouben/vban
#!/usr/bin/bash
TARGET="${1:-127.0.0.1}"
PORT="${2:-6980}"
STREAM="${3:-vban_stream}"
BACKEND="${4:-pulseaudio}"
LOGLEVEL="${5:-1}"
vban_receptor -i $TARGET -p $PORT -s $STREAM -b $BACKEND -l $LOGLEVEL
@guicaulada
guicaulada / grok-patterns
Created June 13, 2019 15:18
grok-patterns
USERNAME [a-zA-Z0-9._-]+
USER %{USERNAME}
INT (?:[+-]?(?:[0-9]+))
BASE10NUM (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))
NUMBER (?:%{BASE10NUM})
BASE16NUM (?<![0-9A-Fa-f])(?:[+-]?(?:0x)?(?:[0-9A-Fa-f]+))
BASE16FLOAT \b(?<![0-9A-Fa-f.])(?:[+-]?(?:0x)?(?:(?:[0-9A-Fa-f]+(?:\.[0-9A-Fa-f]*)?)|(?:\.[0-9A-Fa-f]+)))\b
POSINT \b(?:[1-9][0-9]*)\b
NONNEGINT \b(?:[0-9]+)\b