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
Common steps :
| #!/bin/bash | |
| # This script converts Matlab scripts from ISO-8859-1 to utf-8 (a modern standard) | |
| # requirements: bash, iconv | |
| # | |
| # @author Mebus, https://mebus.github.io | |
| # | |
| for f in $(find . -iname "*.m" -exec file -i {} \; | grep "iso-8859-1" | grep -Eo '^.*\.m') | |
| do |
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| # This is a simple Python script, which allows you to filter events in a *.ics | |
| # by a string in the summary. | |
| # | |
| # Use the Unix pipe > to write the output to a file. | |
| # | |
| # MIT License |
| #!ipxe | |
| # Source: https://gist.github.com/robinsmidsrod/2234639#file-menu-ipxe | |
| # Some menu defaults | |
| #set menu-timeout 5000 | |
| set menu-timeout 0 | |
| set submenu-timeout ${menu-timeout} | |
| isset ${menu-default} || set menu-default exit |
To correctly work with Anaconda on Powershell :
C:\Users\elias\Anaconda3> cmd C:\Users\elias\Anaconda3\envs\py35\Scripts\activate.bat C:\Users\elias\Anaconda3\envs\py35\Scripts\activate.bat
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.| /* | |
| * drivedb.h - smartmontools drive database file | |
| * | |
| * Home page of code is: http://smartmontools.sourceforge.net | |
| * | |
| * Copyright (C) 2003-11 Philip Williams, Bruce Allen | |
| * Copyright (C) 2008-13 Christian Franke <smartmontools-support@lists.sourceforge.net> | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by |
| alphabet = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя" | |
| print(len(alphabet)) | |
| aufgaben = [ | |
| [31, 12, 16, 15, 16, 14, 10, 19, 20], | |
| [19, 6, 12, 18, 6, 20, 1, 18, 30], | |
| [1, 5, 3, 16, 12, 1, 20], | |
| [10, 15, 8, 6, 15, 6, 18], | |
| [5, 16, 24, 6, 15, 20], | |
| [8, 21, 18, 15, 1, 13, 10, 19, 20], |
| #!/usr/bin/python3 | |
| from prettytable import PrettyTable # pip3 install prettytable | |
| ## Modulofunktion | |
| def modulo(zahl): | |
| erg = zahl % 360 | |
| return erg + 360 if erg < 0 else erg | |
| # Ausgabe der Berechnung |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |