Skip to content

Instantly share code, notes, and snippets.

@eggbean
eggbean / $profile
Last active November 12, 2025 09:36
PowerShell $profile which automatically updates in the background when a new version number appears in this gist.
# Version 1.7.0
$gistUrl = "https://api.github.com/gists/81e7d1be5e7302c281ccc9b04134949e"
$gistFileName = '$profile' # Change this to match the filename in your Gist
$checkInterval = 4 # Check for updates every 4 hours
$updateCheckFile = [System.IO.Path]::Combine($HOME, ".profile_update_check")
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
$localProfilePath = $Profile.CurrentUserCurrentHost
# Last update check timestamp
@1player
1player / mullvad.sh
Last active June 28, 2025 22:15
Script to set up Mullvad VPN from Wireguard config files (+ Tailscale VPN support)
#!/bin/bash
#
# Requires: wg-quick from wireguard-tools package.
#
# How to configure: go on your Mullvad account page and download the
# Wireguard configuration for all countries.
# Unpack the archive at $HOME/.config/mullvad/
#
# Then run `mullvad.sh up <2-char country code>`
# and `mullvad.sh down` to tear it down.
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active March 11, 2026 09:27
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@tntwist
tntwist / docker-compose.yml
Last active August 13, 2022 23:19
pi-hole and cloudflared(dns over https) with ipv6
# Requirements
#1. Enable IPv6 for the docker daemon:
#$ cat /etc/docker/daemon.json
#{
# "ipv6": true,
# "fixed-cidr-v6": "2001:db8:1::/64"
#}
#2. reload docker :
#$ sudo systemctl reload docker
#3. start:
@pamolloy
pamolloy / README.md
Last active October 16, 2024 20:40
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@pythoninthegrass
pythoninthegrass / .bash_aliases
Created December 11, 2017 04:13
WSL Ubuntu .bash_aliases
# SOURCES:
# http://unix.stackexchange.com/a/122188
# https://natelandau.com/my-mac-osx-bash_profile
# https://jonsuh.com/blog/bash-command-line-shortcuts
# https://news.ycombinator.com/item?id=8159771
# .bashrc: https://gist.github.com/evdokimovm/67e4fcd938af98528aa108574626e522
# ---------------------------
# ETC
# ---------------------------
@mcandre
mcandre / high-sierra-workstation.vmx
Last active November 20, 2019 04:58
High Sierra VMware Workstation VMX
.encoding = "windows-1252"
config.version = "8"
virtualHW.version = "14"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
#!/usr/bin/python
# This will need the investigate module installed via 'pip install investigate'
import investigate, time, json, fileinput, codecs, sys, os
def slice(l, n):
n = max(1, n)
return [l[i:i + n] for i in range(0, len(l), n)]
@EugenMayer
EugenMayer / msys_hetzner-etc_network_interfaces
Created May 20, 2017 21:57 — forked from jpawlowski/msys_hetzner-etc_network_interfaces
Debian network configuration for Proxmox VE server running on a Hetzner host
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active February 21, 2026 12:58
Partition, format, and mount a drive on Ubuntu