Skip to content

Instantly share code, notes, and snippets.

@agowa
agowa / mount_qcow2.md
Created July 13, 2023 16:22 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

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
@agowa
agowa / .gitmodules
Last active August 30, 2022 06:44
Reproducible ansible init with pinned versions for dependencies
[submodule ".pyenv"]
path = .pyenv
url = https://github.com/pyenv/pyenv.git
branch = master
[submodule ".pyenv-doctor"]
path = .pyenv-doctor
url = https://github.com/pyenv/pyenv-doctor.git
branch = master
[submodule ".pyenv-installer"]
path = .pyenv-installer
@agowa
agowa / init-with-pyenv
Last active December 13, 2021 18:30
Git python venv and git submodule init script
#!/bin/bash
# Place this file in `ci/init.sh` within any Git repository.
: <<EOF
MIT License
Copyright (c) 2021 Klaus Frank
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@agowa
agowa / localstack-docker-compose.yml
Created November 2, 2021 03:50
Nextcloud with S3 primary storage
version: '3.7'
services:
localstack:
image: localstack/localstack
container_name: localstack_service
ports:
- "4566-4584:4566-4584"
- "8055:8080"
environment:
- SERVICES=s3
@agowa
agowa / image.ps1
Last active August 1, 2021 19:23
Show image on windows server core desktop (like bginfo background image)
Add-Type -AssemblyName System.Windows.Forms
$file = "C:\bginfo\bginfo.png"
[System.Windows.Forms.Application]::EnableVisualStyles()
[System.Windows.Forms.Application]::SetCompatibleTextRenderingDefault($false)
$form = [System.Windows.Forms.Form]::new()
$form | Add-Member -Name pictureBox1 -MemberType NoteProperty -Value ([System.Windows.Forms.PictureBox]::new())
([System.ComponentModel.ISupportInitialize]$form.pictureBox1).BeginInit()
$form.SuspendLayout()
@agowa
agowa / gist:1abceb4e279b5c142c19a769d97609e3
Created September 7, 2020 02:13
Minecraft sugar cane farm design helper and brute forcing example
enum EnumBlock {
water
sand
}
enum EnumBlockShort {
w
s
}
function New-Board {
# This script uses this library: https://github.com/lduchosal/ipnetwork
# It needs to be imported using e.g. `Add-Type -AssemblyName ./System.Net.IPNetwork.dll`
# Not to be confused with IPNetwork from Microsoft.AspNetCore.HttpOverrides.dll
function Get-CIDRFromAddressByPrefixList {
[OutputType([System.Net.IPNetwork])]
param(
[Parameter(Mandatory)][System.Net.IPAddress]$address,
[Parameter(Mandatory)][System.Net.IPNetwork[]]$prefixes
)
$address6 = $address.MapToIPv6()
@agowa
agowa / gist:7da8498c8396b5a740fb2381df14ffbf
Last active July 31, 2020 17:58
hv_socket wsl2 not working
1454 execve("/usr/bin/socat", ["/usr/bin/socat", "-b65536", "UNIX-LISTEN:/tmp/.X11-unix/X0,fo"..., "SOCKET-CONNECT:40:0:x0000x701700"...], 0x7ffeabe355f0 /* 18 vars */) = 0
1454 brk(NULL) = 0x556dbc2aa000
1454 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd8b7244b0) = -1 EINVAL (Invalid argument)
1454 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
1454 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
1454 fstat(3, {st_mode=S_IFREG|0644, st_size=30438, ...}) = 0
1454 mmap(NULL, 30438, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fcd904e7000
1454 close(3) = 0
1454 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
1454 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 ;\0\0\0\0\0\0"..., 832) = 832
Binario
Blogpaper
HugoTeX
ace-documentation
air
allegiant
anatole
arabica
archie
axiom
4002 silly decomposeActions fetch ansi-regex@3.0.0
4003 silly decomposeActions extract ansi-regex@3.0.0
4004 silly decomposeActions preinstall ansi-regex@3.0.0
4005 silly decomposeActions build ansi-regex@3.0.0
4006 silly decomposeActions install ansi-regex@3.0.0
4007 silly decomposeActions postinstall ansi-regex@3.0.0
4008 silly decomposeActions finalize ansi-regex@3.0.0
4009 silly decomposeActions refresh-package-json ansi-regex@3.0.0
4010 silly decomposeActions fetch is-fullwidth-code-point@2.0.0
4011 silly decomposeActions extract is-fullwidth-code-point@2.0.0