This guide explains how to create, mount, and maintain a VHDX drive for use with WSL (Windows Subsystem for Linux).
- Windows 10/11 with WSL2 installed
- Administrative access
- PowerShell
- Sufficient disk space
| sudo sh -c 'echo "${SUDO_USER} ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/${SUDO_USER}' && sudo chmod 440 /etc/sudoers.d/${SUDO_USER} |
| #!/bin/bash | |
| # Usage: | |
| # sudo ./script_name.sh [--domain=example.com] [--db_name=wordpress] [--db_user=wordpressuser] [--db_pass=password] [--ftp_user=ftpuser] [--ftp_pass=generated_password] | |
| # All parameters are optional and will default to the values specified in the script. | |
| # Default values | |
| DOMAIN="example.com" | |
| DB_NAME="wordpress" | |
| DB_USER="wordpressuser" |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/usr/bin/env bash | |
| # WP-CLI Back up Script to Amazon S3 | |
| # Source: https://www.jonathan.vc | |
| # Author: Jonathan Dingman | |
| # Adapted from Mike at WP Bullet | |
| #define local path for backups | |
| BACKUPPATH=/tmp/backups | |
| #path to WordPress installations |
| // Example of PM2 ecosystem file, working with nvm environment | |
| // on a AWS EC2 instance running ubuntu | |
| const HOST = ''; | |
| const REPONAME = ''; | |
| module.exports = { | |
| apps: [ | |
| { | |
| name : 'DEVICES:API', | |
| script : 'server.js', |
| #!/bin/bash | |
| # Setting variables to run | |
| DOMAIN="exampledomain.com" | |
| CLOUDFLAREEMAIL="[email protected]" | |
| CLOUDFLAREAPIKEY="0192837465918234650192837465" | |
| RANDOMLEVEL4=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) | |
| # Verifying script is run as root |
Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| mkdir /etc/ssl/nginx | |
| wget -P /etc/ssl/nginx/ https://cs.nginx.com/static/files/CA.crt | |
| ## move nginx-repo.crt to /etc/ssl/nginx/nginx-repo.crt | |
| ## move nginx-repo.key to /etc/ssl/nginx/nginx-repo.key | |
| wget http://nginx.org/keys/nginx_signing.key | |
| apt-key add nginx_signing.key | |
| apt-get install apt-transport-https libgnutls26 libcurl3-gnutls | |
| printf "deb https://plus-pkgs.nginx.com/ubuntu `lsb_release -cs` nginx-plus\n" >/etc/apt/sources.list.d/nginx-plus.list |
| # Add project specific ProGuard rules here. | |
| # By default, the flags in this file are appended to flags specified | |
| # in C:\Users\bkhezry\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt | |
| # You can edit the include path and order by changing the proguardFiles | |
| # directive in build.gradle. | |
| # | |
| # For more details, see | |
| # http://developer.android.com/guide/developing/tools/proguard.html | |
| # Add any project specific keep options here: |