Create self signed certificate:
openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout server.key -days 365 -out server.crtCreate new key:
openssl genrsa -out server.key 2048| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>PHP INFO</title> | |
| <style type="text/css"> | |
| body {font-family: "Ubuntu Mono", "Monospace", "Monaco", "Courier New"; font-size: 12px} | |
| </style> | |
| <link rel="shortcut icon" href="favicon.png" type="image/x-icon" /> | |
| </head> | |
| <body> |
| #!/bin/bash | |
| set -e | |
| PHP_VERSION=7.0 | |
| # Script base on php7.sh by Tom Van Looy https://gist.github.com/tvlooy/881d0d67d0ad699c38a3 | |
| # Dont use this shell script in production server unless you dont care | |
| # You must first add the testing repository in your sourcelist before run this | |
| # You must stop php7-fpm service if you already install |
| # less to scss based on http://stackoverflow.com/a/19167099/2363935 | |
| namespace :convert do | |
| task :less_to_scss do | |
| source_glob = "resources/assets/less/*.less" | |
| dest_dir = "resources/assets/sass/" | |
| rm_r dest_dir rescue nil | |
| mkdir_p(dest_dir) |
| # Configuration file for runtime kernel parameters. | |
| # See sysctl.conf(5) for more information. | |
| # See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
| # an explanation about some of these parameters, and instructions for | |
| # a few other tweaks outside this file. | |
| # Protection from SYN flood attack. | |
| net.ipv4.tcp_syncookies = 1 |
#Debian 8 DO Locale Issues Fix
##Problem
"Locale problems" in both the 32-bit & 64-bit versions of Debian 8 droplets
Create a new Debian 8 droplet and login as root:
| #!/bin/sh | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases | |
| # useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
| ## Remember to make the script executable, and unreadable by others |
| { | |
| "defaultProfile": "{410aa365-68e4-4a68-83f5-6139ccb43b0a}", | |
| "initialRows": 30, | |
| "initialCols": 120, | |
| "alwaysShowTabs": true, | |
| "showTerminalTitleInTitlebar": true, | |
| "experimental_showTabsInTitlebar": true, | |
| "profiles": [ | |
| { | |
| "startingDirectory": "C:\\Users\\$Username", |
Note
If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.
In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.
The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.
For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot