Skip to content

Instantly share code, notes, and snippets.

@shamil
shamil / mount_qcow2.md
Last active June 17, 2024 17:27
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
@protrolium
protrolium / ffmpeg.md
Last active June 15, 2024 01:28
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@frumbert
frumbert / function.js
Created August 9, 2017 09:18
blob to dataurl, because I keep forgetting how to do it!
function blobToDataURL(blob) {
return new Promise((fulfill, reject) => {
let reader = new FileReader();
reader.onerror = reject;
reader.onload = (e) => fulfill(reader.result);
reader.readAsDataURL(blob);
})
}
curl -L -o faas https://github.com/boson-project/faas/releases/download/v0.7.0/faas_darwin_amd64
chmod +x faas
export PATH=$PATH:/dirholdingfaas/
create a new project folder/dir
mkdir one
cd one
@ptorre
ptorre / CMakeList.txt
Last active February 23, 2022 03:12
Configuring GoogleTest in CMakeList.txt (Building internally vs. using as installed on host).
###
# Compiler flags (not required for using GoogleTest)
#
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
##########
# Use ONE of the below sections to use GoogleTest.
# This example assumes that main_test.cc contains your tests.