Skip to content

Instantly share code, notes, and snippets.

View sio's full-sized avatar

Vitaly Potyarkin sio

View GitHub Profile
@wolfv
wolfv / fetch.sh
Created September 8, 2021 13:08
Fetch from OCI registry (ghcr.io)
export TOKEN=$(curl --silent https://ghcr.io/token\?scope\=repository:wolfv/artifact:pull | jq -r .token)
curl \
--silent \
--request 'GET' \
--header "Authorization: Bearer $TOKEN" \
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
'https://ghcr.io/v2/wolfv/artifact/manifests/1.0'
echo "\n\nFetching image content now:\n\n"
@m13253
m13253 / init.sh
Last active February 19, 2024 11:31
Minimal working initramfs for BusyBox, with login
#!/bin/busybox sh
# 1) Download a prebuilt BusyBox binary here:
# https://busybox.net/downloads/binaries/
#
# 2) Prepare your kernel
# cp /boot/vmlinuz vmlinuz
#
# 3) Copy the files
# install -Dm0755 busybox-x86_64 initramfs/bin/busybox
@shamil
shamil / mount_qcow2.md
Last active April 25, 2024 09:25
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