Skip to content

Instantly share code, notes, and snippets.

View cipri-tom's full-sized avatar

Ciprian Tomoiaga cipri-tom

View GitHub Profile
@ishad0w
ishad0w / sources.list
Last active March 21, 2024 14:37
Debian 10 (Buster) -- Full sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb-src http://deb.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
@craigphicks
craigphicks / iptree.py
Last active April 7, 2020 10:52
Convert `iptables -S` output to a depth-first tree listing
#!/usr/bin/env python3
'''
Convert `iptables -S` output to a depth-first tree listing
Reads from standard input
Craig P Hicks 2019
MIT License
'''
import sys
@pshchelo
pshchelo / mount-qcow2-lvm-image.sh
Last active March 6, 2024 19:05
List of commands to mount/unmount a qcow2 image conatining LVM partitions.
# kudos to dzaku at consolechars.wordpress.com
### MOUNT qcow2 image with lvm partitions
# ensure nbd can handle that many partitions
sudo modprobe nbd max_part=8
# present image as block device through NBD
sudo qemu-nbd --connect=/dev/nbd0 <image.qcow2>
@dantonnoriega
dantonnoriega / python_blocks_for_repl.py
Last active September 18, 2021 03:19
Using SublimeREPL, this allows one to transfer AND evaluate blocks of python code. The code automatically detect python blocks, executes them, and skips white space, comment blocks (""") and comment lines (# ...).
"""
DESCRIPTION:
Using SublimeREPL, this plugin allows one to easily transfer AND
evaluate blocks of python code. The code automatically detect python
blocks and executes only code lines, omitting empty space and comments.
One can skips space, comment blocks and comment lines by executing on
empty lines, comments etc.
REQUIRES:
working with only 2 groups in the window. the main group (group 0)