Skip to content

Instantly share code, notes, and snippets.

@ajmassi
ajmassi / docker-nuke.sh
Last active December 14, 2021 19:30
Blow away all Docker containers, images, and artifacts at once.
#!/bin/sh
#"Now I am become rm-f, the destroyer of containers."
echo "Killing running containers..."
cont1=$(docker ps -q)
if [ -n "$cont1"]; then docker kill $cont1; fi
echo
echo "Removing containers..."
cont2=$(docker ps -a -q)
@ajmassi
ajmassi / ScapyTLSmod.md
Created May 7, 2020 03:57
Simple TLS field manipulation using Scapy TLS module.

Scapy TLS Field Manipulation

Used Scapy 2.4.3 w/ IPython 7.13.0

Pre-Req:

# Enable TLS parsing in Scapy in (/usr/lib/pythonX/dist-packages/scapy/config.py) by adding 'tls' to the "load_layers" list
# OR in a script by adding the line:
load_layer("tls")
@ajmassi
ajmassi / LXCBindMount.md
Last active May 6, 2024 00:56
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@ajmassi
ajmassi / chromeShortcut.txt
Created July 28, 2017 00:30
How to create Google Chrome shortcut to launch specific url as standalone webpage
Windows:
right click on desktop
new -> shortcut
In the popup, paste the following line with <webpage> substituted:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=<webpage>
Example (Spotify):
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=https://play.spotify.com/collection/songs