Running as root, obviously:
apt install -y qemu-kvm libvirt-bin bridge-utils virtinst| package sample; | |
| import java.io.InputStream; | |
| import java.io.PushbackInputStream; | |
| import java.io.InputStreamReader; | |
| import java.io.Reader; | |
| import java.io.BufferedReader; | |
| import java.util.List; | |
| import java.util.ArrayList; |
Following netplan creates a virtual bridge br0 connected to interface enp2s0
and both have same mac address (as required by hetzner)
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
match:
| #!/usr/bin/python | |
| import argparse, glob, os | |
| from PIL import Image | |
| formats = ["BMP", "DIB", "EPS", "GIF", "ICNS", "ICO", "IM", "JPG", "JPEG", | |
| "J2K", "J2P", "JPX", "MSP", "PCX", "PNG", "PPM", "SGI", | |
| "SPIDER", "TGA", "TIFF", "WebP", "XBM"] | |
| parser = argparse.ArgumentParser(description="Pillow example - batch converter.") | |
| parser.add_argument('-outdir', default='.', help='Directory to save converted image files') |
This is a simple script for downloading all attachements from all tickets in Trac. I looked around and found nothing to fit my needs so here is a script I whipped up. It uses BeautifulSoup4 to crawl the pages, and requests to fetch the content.
$ virtualenv venv
$ . venv/bin/activate
$ pip install -r requirements.txtThe first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"This creates a new ssh key, using the provided email as a label. The entire key generation process looks like this:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):