- Make sure you have successfuly set up iPXE, iSCSI target (iSCSI Enterprise Target on Debian works fine for me), TFTP server and some time to spend.
- Get yourself a NTFS-formatted USB stick.
- Copy contents of installation DVD into mentioned USB stick.
- Get a copy of wimboot and load it into your TFTP server.
- Copy boot/bcd, boot/boot.sdi, sources/boot.wim and bootmgr into TFTP root as well.
- Create the bootstrap script (included bootstrap.ipxe file) and boot your
This file contains 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
#!/usr/bin/env bash | |
# | |
# openvpn_stats.sh: | |
# OpenVPN monitoring script for Zabbix | |
# | |
# $1: OpenVPN server host IP/hostname. (default: 127.0.0.1) | |
# $2: OpenVPN management CLI port. (default: 7505) | |
# $3: Password file for OpenVPN management CLI. (default: <none>) | |
# $4: Timeout(sec) (default: 3) | |
# |
This file contains 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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
This file contains 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
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<HostName>danilop.net</HostName> | |
<ReplaceKeyWith/> | |
</Redirect> | |
</RoutingRule> |
This file contains 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
# Installing | |
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom | |
# Running | |
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc |
This file contains 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
version: '3.4' | |
x-logging: &logging | |
logging: | |
driver: "json-file" | |
options: | |
max-size: 10M | |
max-file: 1 | |
services: | |
fluentd: | |
image: $INTERNAL_REGISTRY/fluentd |
This file contains 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
#include <Poco/Net/HTTPClientSession.h> | |
#include <Poco/Net/HTTPRequest.h> | |
#include <Poco/Net/HTTPResponse.h> | |
#include <Poco/StreamCopier.h> | |
#include <Poco/Path.h> | |
#include <Poco/URI.h> | |
#include <Poco/Exception.h> | |
using namespace Poco::Net; | |
using namespace Poco; |
This file contains 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 openpyxl import load_workbook | |
wb = load_workbook('template.xlsx') | |
# grab the active worksheet | |
ws = wb.active | |
# Data can be assigned directly to cells | |
ws['A2'] = 'Tom' | |
ws['B2'] = 30 |
This file contains 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 sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, ForeignKey, Integer, String, ForeignKeyConstraint | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker, relationship | |
Model = declarative_base() | |
class Parent(Model): | |
__tablename__ = 'parent' | |
id = Column(Integer, primary_key=True) |
This file contains 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
# /etc/udev/rules.d/99-usb-serial.rules | |
# udevadm info --attribute-walk -n /dev/ttyUSB0 |grep serial (can be used to get serial number) | |
# udevadm control --reload-rules (reload rules) | |
# udevadm trigger (re-add all devices) | |
# see https://wiki.archlinux.org/index.php/Bus_pirate | |
# for some reason, ATTRS{bInterfaceNumber}=="00" is not working, hence the use of ENV{} | |
# single USB/serial adapters | |
SUBSYSTEM=="tty", ATTRS{serial}=="A900TUKZ", SYMLINK+="ttyUSB_bub_1" | |
SUBSYSTEM=="tty", ATTRS{serial}=="A700fdWb", SYMLINK+="ttyUSB_bub_2" |
OlderNewer