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
We’re now going to clean up disk space on the VM so when we package it into a new Vagrant box, it’s as clean as possible. First, remove APT cache
$ sudo apt-get clean
Then, “zero out” the drive (this is for Ubuntu):
$ sudo dd if=/dev/zero of=/EMPTY bs=1M
// http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/ | |
// http://www.analysir.com/blog/wp-content/uploads/2014/03/Arduino_Record_Long_AirConditioner_Infrared_Signals_10.txt | |
// For LG AC | |
/* | |
Author: AnalysIR | |
Revision: 1.0 | |
This code is provided to overcome an issue with Arduino IR libraries | |
It allows you to capture raw timings for signals longer than 255 marks & spaces. |
// https://github.com/shirriff/Arduino-IRremote | |
#include <IRremote.h> | |
IRsend irsend; | |
void setup() | |
{ | |
} |
#! /bin/sh | |
[ ! -d "$1" ] && echo "$1 is not a valid directory." && exit 1; | |
trap "umount \"${1}\"/tmp \"${1}\"/dev/null \"${1}\"/dev/pts \"${1}\"/dev/random \"${1}\"/dev/shm \"${1}\"/dev/urandom \"${1}\"/proc" EXIT INT TERM HUP PIPE && | |
mount --bind /tmp "${1}/tmp" && \ | |
mount --bind /dev/null "${1}/dev/null" && \ | |
mount --bind /dev/pts "${1}/dev/pts" && \ | |
mount --bind /dev/random "${1}/dev/random" && \ | |
mount --bind /dev/shm "${1}/dev/shm" && \ | |
mount --bind /dev/urandom "${1}/dev/urandom" && \ | |
mount --bind /proc "${1}/proc" && \ |
# | |
# Authors: | |
# Tercio Gaudencio Filho <[email protected]> | |
# | |
# Ex: | |
# USERNAME@HOSTNAME [/FULL/PATH] ✘ $ TIME | |
function prompt_0x3333_setup { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS |
from __future__ import print_function | |
import picamera | |
from picamera import mmal, mmalobj, exc | |
from picamera.mmalobj import to_rational | |
import time | |
MMAL_PARAMETER_ANALOG_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x59 | |
MMAL_PARAMETER_DIGITAL_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x5A |
#!/usr/bin/env bash | |
# | |
# Author: Markus (MawKKe) [email protected] | |
# Date: 2018-03-19 | |
# | |
# | |
# What? | |
# | |
# Linux dm-crypt + dm-integrity + dm-raid (RAID1) | |
# |