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
| "\e[1~": beginning-of-line | |
| "\e[4~": end-of-line | |
| "\e[5~": history-search-backward | |
| "\e[6~": history-search-forward | |
| "\e[3~": delete-char | |
| "\e[2~": quoted-insert | |
| "\e[5C": forward-word | |
| "\e[5D": backward-word | |
| "\e\e[C": forward-word | |
| "\e\e[D": backward-word |
| #!/bin/bash | |
| # | |
| # PostgreSQL Backup Script Ver 1.0 | |
| # http://autopgsqlbackup.frozenpc.net | |
| # Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
| # | |
| # This script is based of the AutoMySQLBackup Script Ver 2.2 | |
| # It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
| # | |
| # The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
| #!/bin/bash | |
| JQPATH=$(which jq) | |
| if [ "x$JQPATH" == "x" ]; then | |
| echo "Couldn't find jq executable." 1>&2 | |
| exit 2 | |
| fi | |
| set -eu | |
| shopt -s nullglob |
Current version of Ansible (1.7.1) does not merge hashes in the include_vars task even if told so via hash_behaviour = merge in your ansible.cfg. ansible/ansible#9116
This action plugin will merge hashes no matter how you have configured your hash_behaviour.
Save include_vars_merged.py to library/plugins/action/include_vars_merged.py
Save include_vars_merged to library/custom/include_vars_merged
Edward Snowden answered questions after a showing of CITIZENFOUR at the IETF93 meeting; this is a transcript of the video recording.
For more information, see the Internet Society article.
| # Name the components on this agent | |
| a1.sources = r1 | |
| a1.sinks = k1 | |
| a1.channels = c1 | |
| a1.sources.r1.type = exec | |
| a1.sources.r1.command = tail -F /var/log/example.log | |
| a1.sources.r1.channels = c1 | |
| a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink |
Picking the right architecture = Picking the right battles + Managing trade-offs
| # Example scrape config for pods | |
| # | |
| # The relabeling allows the actual pod scrape endpoint to be configured via the | |
| # following annotations: | |
| # | |
| # * `prometheus.io/scrape`: Only scrape pods that have a value of `true` | |
| # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. This | |
| # will be the same for every container in the pod that is scraped. | |
| # * this will scrape every container in a pod with `prometheus.io/scrape` set to true and the | |
| port is name `metrics` in the container |
| #!/usr/bin/python3.7 | |
| import asyncio | |
| import ipaddress | |
| import re | |
| import sys | |
| MAX_NUMBER_WORKERS = 200 |