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/bash | |
| # OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
| # This script will work on Debian, Ubuntu, CentOS and probably other distros | |
| # of the same families, although no support is offered for them. It isn't | |
| # bulletproof but it will probably work if you simply want to setup a VPN on | |
| # your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and | |
| # universal as possible. | |
I have the some issue.
When I run the ee site create command I get this:
Running pre-update checks, please wait... Setting up NGINX configuration [Done] Setting up webroot [Done] Downloading WordPress [Fail] Oops Something went wrong !! Calling cleanup actions ...
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: vpnclient | |
| # Required-Start: $all | |
| # Required-Stop: $network $local_fs $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start VPN Client at boot time | |
| # chkconfig: 345 44 56 | |
| # description: Start VPN Client at boot time. |
Assume there are two servers 192.168.1.1 as the tester, and 172.16.8.1 as the target. We will test which open inbound ports on the target server.
iptables -t nat -A PREROUTING -s 192.168.1.1/32 -p tcp -m tcp --dport 80 -j RETURN
iptables -t nat -A PREROUTING -s 192.168.1.1/32 -p tcp -j DNAT --to-destination :80
| #!/usr/local/env bash | |
| # Update system | |
| apt-get update && apt-get -y upgrade | |
| # Get build tools | |
| apt-get -y install build-essential wget curl | |
| # Define softether version | |
| RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) | |
| IFS='-' read -r -a RTMS <<< "${RTM}" |
First, find out where pipenv has created your virtualenv setup and stashed the python executable you are using. From the command line in your project folder (where your Pipfile is), execute the following:
pipenv --py
This will give you the full path to your virtualenv python install. For my sample project it was:
VIRTUALENV_PYTHON_PATH_HERE=C:\Users\UmarDx\.virtualenvs\api-9dSW7b5h\Scripts\python.exe
Now, create a local settings file that VS Code will use for your project
To change python version system-wide we can use update-alternatives command.
Logged in as a root user, first list all available python alternatives:
# apt-get update
# apt-get install python3.6
# update-alternatives --list python
update-alternatives: error: no alternatives for pythonThe above error message means that no python alternatives has been recognized by update-alternatives command.
| // node: | |
| var moment = require('moment'); | |
| moment().add('days', 2).fromNow(); | |
| // 'in 2 days' | |
| moment().subtract('days', 2).fromNow(); | |
| // '2 days ago' | |
| moment('November 1977').fromNow() |