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
| #!/bin/sh | |
| # | |
| # Put this file in /usr/local/etc/rc.d/btsync.sh | |
| case "$1" in | |
| stop) | |
| echo "Stop BitTorrent Sync..." | |
| kill "`cat /volume1/homes/btsync/bin/.sync/sync.pid`" | |
| kill "`cat /volume1/homes/btsync/bin/.sync/sync.pid`" |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
| <?php | |
| /** | |
| * This file will demonstrate a method to export fields to code. | |
| * You can use this to easily create fields using the UI, export to code | |
| * and then use in a custom module. Upon installation of the module | |
| * your fields and instances will already be set up. | |
| */ | |
| // Create the fields you want using the Drupal UI. | |
| // On the same site, go to example.com/devel/php |
| - name: Group by Distribution | |
| hosts: all | |
| tasks: | |
| - group_by: key=${ansible_distribution} | |
| - name: Set Time Zone | |
| hosts: Ubuntu | |
| gather_facts: False | |
| tasks: | |
| - name: Set timezone variables |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: SystemEmail | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Send email | |
| # Description: Sends an email at system start and shutdown | |
| ### END INIT INFO |
| <?php | |
| /* | |
| OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
| Author: _ck_ (with contributions by GK, stasilok) | |
| Version: 0.1.7 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
| 0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
| <?php | |
| function skeleton_menu() { | |
| $items['admin/skeleton/batch'] = array( | |
| 'title' => 'Skeleton Batch', | |
| 'page callback' => 'skeleton_batch_init', | |
| 'access arguments' => array('Administer content'), | |
| 'type' => MENU_NORMAL_ITEM, | |
| ); | |
| <?php | |
| // | |
| // curl_post_update.php | |
| // You can modify this script to make PHP use a webpage like a person sitting | |
| // at a computer would use a webpage. | |
| // | |
| // tags: #php #curl #form | |
| // | |
| // This script is licensed under the JSON licence http://www.json.org/license.html | |
| // "The Software shall be used for Good, not Evil." style license |
| drush php-eval 'node_access_rebuild();' |