Skip to content

Instantly share code, notes, and snippets.

@bagder
bagder / slop.md
Last active November 2, 2025 21:27
AI slop security reports submitted to curl

Slop

This collection is limited to only include the reports that were submitted as security vulnerabilities to the curl bug-bounty program on Hackerone.

Several other issues not included here are highly suspcious as well.

Reports

  1. [Critical] Curl CVE-2023-38545 vulnerability code changes are disclosed on the internet. #2199174
@kwasmich
kwasmich / EvilMouse.js
Last active May 1, 2024 20:38
UserScript for browser to enable Disney Plus on Linux
// ==UserScript==
// @name Enable Disney Plus on Linux
// @description This is your new file, start writing code
// @match *://*.disneyplus.com/*
// ==/UserScript==
Object.defineProperty(navigator, "userAgent", { value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36", configurable: true, enumerable: true, writable: true });
@shakalandy
shakalandy / gist:6d41c18437d96bcafad950e972c6ad10
Created October 12, 2022 08:37
ansible fact collecting nginx vhosts
#!/bin/bash
###############################################
# NGINX FACT
###############################################
if [ -f /usr/sbin/nginx ]; then
VHOSTS=$(nginx -T 2>/dev/null | grep "server_name " | awk '{print $2}' | cut -d ";" -f 1 | grep -v localhost |sort | uniq | grep -v -e '^$')
fi
@steven-terrana
steven-terrana / rancher-login.sh
Created October 4, 2022 19:20
grab all available kubeconfigs from the rancher management console and consolidate
#!/bin/bash
# this script queries the rancher management console defined via
# auth.env to fetch all of the currently available kubeconfig files
#
# those kubeconfig files are then consolidated into a single kubeconfig
# in the default location
#
# after this script is run - you can use kctx to easily switch between
# available clusters
# FIRST VERSION - Outputs UTS formatted timestamp.
# -------------------------------------------------------------------------------------
# handy pipe redirect that appends a datestamp to every line of output. Just paste this into
# the top of a typical BASH script. Note that it outputs localtime due to limitations in
# BASH printf (whichis used for speed reasons). Automated runner processes as a rule of thumb
# should be set to UTC anyways, so it seems not a significant limitation.
s_datestamp() {
while IFS= read -r line; do
@kwasmich
kwasmich / Skip YouTube Ads.js
Last active May 24, 2023 15:30
Script for Userscripts browser extension to skip ads on Youtube.
// ==UserScript==
// @name Skip YouTube Ads
// @description This is your new file, start writing code
// @match *://*.youtube.com/*
// ==/UserScript==
function skipAd() {
const adPlaying = document.body.querySelector(".ad-showing");
if (!adPlaying) {
@mschmitt
mschmitt / stfd.conf
Last active March 18, 2022 09:00
systemd: Howto quickly sigkill (-9) a service that blocks shutdown for minutes. (Here: ESET Antivirus, eea.service)
# /lib/systemd/system/eea.service.d/stfd.conf
[Service]
TimeoutStopSec=5
TimeoutStopFailureMode=kill
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@erikw
erikw / ..git-commit-status - Generate git commit message from git-status.md
Last active June 18, 2025 09:31
Generate git commit message from git-status. Will generate a commit message like "Added: file1.py file2.py file3.py Modified: file4.py file5.py Deleted: README.md Renamed: test.txt-> test2.txt". Put this in your .gitconfig.

git commit-status alias

An alias that will generate a git commit message staged changes as shown in git-status. Put this alias (section below) in your .gitconfig.

The message generated will be in the format of:

$ git status --porcelain
A file1.py
A file2.py
A file3.py
@ryancdotorg
ryancdotorg / wzip.py
Last active January 25, 2025 22:46
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct