-
apt install qemu-kvm qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients virtinst virt-manager virt-viewer adduser koi8-r libvirt adduser koi8-r libvirt-qemu adduser koi8-r kvm adduser koi8-r qemu virt-install --virt-type kvm --name buster --memory 512 --location http://httpredir.debian.org/debian/dists/buster/main/installer-amd64/ --disk size=4 --os-variant debiantesting --extra-args "console=ttyS0" -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # udevadm info --path=/class/net/wlxe894f61788fc --attribute-walk --query env | |
| # udevadm control --reload-rules | |
| # udevadm trigger | |
| # udevadm monitor --subsystem=net | |
| # udevadm test --action=add /class/net/wlxe894f61788fc | |
| SUBSYSTEM=="net", SUBSYSTEMS=="usb", ACTION=="add", DRIVERS=="?*", ATTRS{product}=="*", ATTR{type}=="1", KERNEL=="wlan*", NAME="%k%n" |
- https://linux-notes.org/rabota-s-tomami-volumes-v-docker/
- https://stackoverflow.com/questions/41935435/understanding-volume-instruction-in-dockerfile
- https://linuxhint.com/dockerfile_volumes/
- http://containertutorials.com/volumes/volume_from_image.html
- https://stackoverflow.com/questions/34809646/what-is-the-purpose-of-volume-in-dockerfile
- https://stackoverflow.com/questions/49633701/docker-volume-empty-after-its-created
- http://jpetazzo.github.io/2015/01/19/dockerfile-and-data-in-volumes/
- https://ru.stackoverflow.com/questions/771085/%D0%A7%D1%82%D0%BE-%D0%B4%D0%B5%D0%BB%D0%B0%D0%B5%D1%82-%D0%B8%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%86%D0%B8%D1%8F-volume-%D0%B2-dockerfile
- docker/compose#3211
- https://stackoverflow.com/questions/29924843/how-do-i-set-hostname-in-docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import typing as ty | |
| import abc | |
| class ModelMeta(abc.ABCMeta): | |
| def __new__(msc, name, bases, ns): | |
| cls = super().__new__(msc, name, bases, ns) | |
| try: | |
| # We do not need something like To's id here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import heapq | |
| import asyncio | |
| class EventSimulator(asyncio.AbstractEventLoop): | |
| '''A simple event-driven simulator, using async/await''' | |
| def __init__(self): | |
| self._time = 0 | |
| self._running = False | |
| self._immediate = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from marshmallow import Schema, fields | |
| class DictField(fields.Field): | |
| def __init__(self, *args, **kwargs): | |
| fields.Field.__init__(self, *args, **kwargs) | |
| self.name = fields.Str(required=True) | |
| self.projects = fields.Nested(Project(many=True), required=True) | |
| def _deserialize(self, value, attr, data): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-WindowsKey { | |
| param ($targets = ".") | |
| $hklm = 2147483650 | |
| $regPath = "Software\Microsoft\Windows NT\CurrentVersion" | |
| $regValue = "DigitalProductId" | |
| Foreach ($target in $targets) { | |
| $productKey = $null | |
| $win32os = $null | |
| $wmi = [WMIClass]"\\$target\root\default:stdRegProv" | |
| $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue) |