Skip to content

Instantly share code, notes, and snippets.

View tbaschak's full-sized avatar

Theo Baschak tbaschak

View GitHub Profile
@yorickdowne
yorickdowne / friday.md
Last active December 31, 2025 20:13
Debian 13 trixie upgrade

Debian 13

Caution Upgrading from Debian 12 to Debian 13 on machines with mdadm has intermittently failed for me; symptom is that grub EFI is not up to date and system boots into BIOS. Root cause under investigation; it might not be related to mdadm.

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

@yorickdowne
yorickdowne / yawn.md
Last active October 8, 2025 18:53
Debian 12 bookworm upgrade

Debian 12

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 12 "bookworm" from Debian 11 "bullseye" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 11 to Debian 12. If you are on Debian 10, upgrade to Debian 11 first and make sure to change the security repo as per the release notes. Then once on Debian 11, you can upgrade to Debian 12.

  • Check free disk space
@willglynn
willglynn / doc.md
Last active December 18, 2025 23:29
Cloudflare Tunnels/`cloudflared` on Mikrotik RouterOS 7

Why?

In their own words:

Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s edge. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare.

Beyond cyberattacks, this can be particularly useful if you're behind CGNAT, e.g. on cellular or satellite, and you want to make services on or behind your router available to the broader world.

How?

current_hour=${CURRENT_HOUR:-$(date "+%k")}
# I have no idea how to get the actual list of colors but this has some colors in the screenshot
# https://gabri.me/blog/custom-colors-in-your-zsh-prompt
# Set the color value
work_color=154
keep_going_color=157
wrap_up_color=34
@stroebs
stroebs / make-chr.sh
Last active January 19, 2025 10:59
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 20.04 tested working 29/03/2022)
#!/bin/bash
#
# Digital Ocean Ubuntu 18.04 x64 Droplet with "Regular Intel" CPU.
# Running:
# git clone https://gist.github.com/54fc09734a3911e91eeeb43434f117df.git
# cd 54fc09734a3911e91eeeb43434f117df/
# chmod +x make-chr.sh
# ./make-chr.sh
#
# Once the reboot is done, login with root/CHANGEME and change the password!
@jgamblin
jgamblin / scan.sh
Last active February 5, 2020 20:12
Continual Nmap With Slack Alerting.
#!/bin/bash
#
# Requires NMAP, NDIFF and Slackcli
# https://candrholdings.github.io/slack-cli/
# TARGETS should be set by env variable
# INTERVAL how many seconds to wait between scans
# SLACKTOKEN from here https://api.slack.com/web
TARGETS="scanme.handsonhacking.org"
@jgamblin
jgamblin / ut1mdiff.sh
Last active February 27, 2019 03:53
Download Umbrella's Top 1 Million Sites List For Last 2 Days And List New Sites
#!/bin/bash
day1=$(date --date="2 days ago" +"%Y"-"%m"-"%d")
day2=$(date --date="3 days ago" +"%Y"-"%m"-"%d")
mkdir -p ~/ut1m
cd ~/ut1m
#Get Yesterdays Data
printf "Getting $day1 Data\n"
cd ~/ut1m
mkdir $day1
This be a restricted node!
You best have permission from da admins or we be coming for ya.
Protect ya neck and respect this deck.
Reloads will not he tolerated and will be punishable by RZA's Iron Fists
$$$$$$$$$$$$$$$$""$o$o$o$o$n$oo$$""$$$$$$$$$$$$$$$
$$$$$$$$$$$$""o$$$$$$$$$$"$"$$$$$$$o$"$$$$$$$$$$$$
$$$$$$$$$"$o$$$$""$oo $ "" """$$$oo"$$$$$$$$$
$$$$$$$"o$$$$" ""o $oo o o ""$$$o"$$$$$$$
$$$$$"o$$$” oo$$$$$$$$$$o "$$$o"$$$$$
$$$$"o$$$ $ o$$$$$$$$$$$$$$"$$oo "$$$ $$$$
@tbaschak
tbaschak / check_github.py
Last active January 13, 2018 01:17
a simple python script to check/warn on Github's status via their API.
#!/usr/bin/env python2.7
from urllib2 import Request, urlopen, URLError
# for Python3 use the following:
# from urllib.request import Request, urlopen
# from urllib.error import URLError
import sys
import json
#!/usr/bin/env python
'''
Prototype tool for bulk IP->AS lookups for a specific date
Downloads RIS data locally (using CAIDA BGPSTREAM)
expects IP addresses/prefixes on STDIN (IPv4 and IPv6)
takes a single command-line argument which is the DATE for which to download the table (any format convertable by arrow will do)
example use:
cat file_with_maaaaany_ips | ./bulk-ris-lookup.py 2009-03-22
'''