Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍👨‍👦‍👦
using gnu

Ishimoto Shinobu protonesso

👨‍👨‍👦‍👦
using gnu
View GitHub Profile
@shamil
shamil / mount_qcow2.md
Last active Jan 18, 2021
How to mount a qcow2 disk image
View mount_qcow2.md

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
@rofl0r
rofl0r / init.c
Created Aug 6, 2013
minimal init daemon by rich felker, author of musl libc
View init.c
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
View clang-uclibc.patch
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 181993)
+++ lib/Driver/Tools.cpp (working copy)
@@ -6007,8 +6007,12 @@
CmdArgs.push_back("/lib/ld-linux.so.3");
}
else if (ToolChain.getArch() == llvm::Triple::mips ||
- ToolChain.getArch() == llvm::Triple::mipsel)
- CmdArgs.push_back("/lib/ld.so.1");
View gist:1396569
/**
* Represents black
*/
BLACK(0x0),
/**
* Represents dark blue
*/
DARK_BLUE(0x1),
/**
* Represents dark green
@zliuva
zliuva / gist:1084476
Last active Jan 4, 2021
A minimal Mach-o x64 executable for OS X
View gist:1084476
; A minimal Mach-o x64 executable for OS X (also see below Mountain Lion version)
;
; $ nasm -f bin -o tiny_hello tiny_hello.s
; $ chmod +x tiny_hello
; $ ./tiny_hello
; Hello World!
; $
; c.f.
; http://osxbook.com/blog/2009/03/15/crafting-a-tiny-mach-o-executable/ ( the original tiny mach-o executable )
You can’t perform that action at this time.