Skip to content

Instantly share code, notes, and snippets.

@subvillion
subvillion / ipv6guide.md
Created August 11, 2024 15:15 — forked from timothyham/ipv6guide.md
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@subvillion
subvillion / script-template.sh
Created November 18, 2022 09:05 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@subvillion
subvillion / import
Created May 5, 2022 12:13 — forked from Pliner/import
Mikrotik antifilter.download update script
:do {
:do {
/file remove "/ipsum.rsc";
/file remove "/subnet.rsc";
} on-error={}
:put "Downloading ipsum.rsc...";
:do {
/tool fetch url="https://antifilter.download/list/ipsum.rsc" dst-path="/ipsum.rsc"
} on-error={
@subvillion
subvillion / KVM Attempt 1
Created April 13, 2022 07:59 — forked from ilude/KVM Attempt 1
KVM virt-install command
qemu-img create -f qcow2 /pool/vms/xp.qcow2 50G
sudo virt-install --connect qemu:///system -n xp -r 512 --disk path=/pool/vms/xp.qcow2,size=50 \
-c /pool/iso/windows/en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso \
--graphics vnc,listen=0.0.0.0,port=65322 --noautoconsole \
--os-type windows --os-variant winxp
@subvillion
subvillion / pick_word.py
Created January 2, 2017 11:40 — forked from ed-flanagan/LICENSE
Oren Tirosh’s mnemonic word list
#!/usr/bin/env python3
import random
def main():
with open("wordlist.txt", "r") as word_file:
words = [word.rstrip() for word in word_file.readlines()[2:]]
print(random.choice(words))
@subvillion
subvillion / img.py
Created January 27, 2013 15:15 — forked from bobuk/img.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Video of this screencast: https://vimeo.com/57296525
#
#
from __future__ import print_function, division, absolute_import
from PIL import Image as pImage
import numpy
@subvillion
subvillion / views.py
Created January 8, 2013 05:59
debug sql запросов в django
# блок debug sql запросов
# from django.db import connection
# print connection.queries[-1]['sql']
# print posts.temp
# print posts.timestamp
...
import urllib2, lxml.html
...
file = urllib2.urlopen('http://m.rp5.ru/7259/ru')
data = file.read()
file.close()
doc = lxml.html.document_fromstring(data)