This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
#!/usr/bin/python | |
# Script to monitor the live port usage on a switch running OPX(OpenSwitch), tested on OPX 3.1.0 | |
# Written 2019 - Cory Hawkless - cory@hawkless.id.au | |
# Tested and confirmed working in producion on a Dell S3048-ON switch | |
# | |
# | |
# Example usage - sudo python showspeed.py --port e101-050-0 | |
import sys |
#!/usr/bin/python | |
# Written sometime 2019 by Cory Hawkless | |
# This code is NOT intended for anything mission critical, It will likely fail and melt your hardware | |
# Use it as a guide on how to extract some meaningful data from the Dell *-ON serial Switches running OPX | |
# | |
# | |
# Usage - sudo python showspeed.py --port e101-050-0 | |
# Will show the speed in and out in kb\mb\gb /s ofr that particulat port every 2 seconds ish |
/* pixieset.com full size image scraper | |
* | |
* Rips all images in highest quality | |
* | |
* To use scroll to the very bottom of the album and press F12 then paste the below snippet in and press enter. | |
* The full file list will be copied to your clipboard afterwards. You can use jdownloader to easily download the full list. | |
* Or wget all the files, I use Atom IDE or Notepad++ to simply add wget to the beginning of each line then | |
* copy+past into the linux CLI | |
*/ |
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
#!/bin/bash | |
if [ "$4" == "" ]; then | |
echo "usage: $0 <local_ip> <remote_ip> <new_local_ip> <new_remote_ip>" | |
echo "creates an ipsec tunnel between two machines" | |
exit 1 | |
fi | |
SRC="$1"; shift | |
DST="$1"; shift |
#!/bin/bash | |
# `gitea dump` doesn't currently back up LFS data as well, only git repos | |
# It primarily backs up the SQL DB, and also the config / logs | |
# We'll backup like this: | |
# * "gitea dump" to backup the DB and config etc | |
# * tar / bzip all the repos since they will be skipped | |
# * Not rotated because git data is immutable (normally) so has all data | |
# * rsync LFS data directly from /volume/docker/gitea/git/lfs | |
# * No need for rotation since all files are immutable |
<script> | |
alert("Hello! I am an alert box!!"); | |
</script> |