# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button
# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 1T 0 part
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//== Spacing | |
// | |
$grid-breakpoints: ( | |
xs: 0, | |
sm: $screen-sm-min, | |
md: $screen-md-min, | |
lg: $screen-lg-min | |
); | |
$spacer-x-0: 0rem; | |
$spacer-y-0: 0rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* @author @sepiariver | |
* | |
* GPL license, no warranties, no liability, etc. | |
* | |
* USAGE EXAMPLE: | |
* [[rootResource? &toPlaceholder=`root_resource`]] | |
* //followed by something like |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* getTVText snippet | |
* | |
* Dynamically Render Template Variable on front-end to get not only the value, | |
* but also its input's "text" | |
* | |
* @author goldsky <[email protected]> | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables. | |
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding. | |
Network configuration | |
Here’s how it’s done: | |
Create a virtual interface that serves as the gateway for your VMs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Snippet: [[SnippetName]] | |
Chunk: [[$ChunkName]] | |
System Setting: [[++SettingName]] | |
TV: [[*fieldName/TvName]] | |
Link tag: [[~PageId? ¶mName=`value`]] | |
Placeholder: [[+PlaceholderName]] | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getAspectRatio(int $width, int $height) | |
{ | |
// search for greatest common divisor | |
$greatestCommonDivisor = static function($width, $height) use (&$greatestCommonDivisor) { | |
return ($width % $height) ? $greatestCommonDivisor($height, $width % $height) : $height; | |
}; | |
$divisor = $greatestCommonDivisor($width, $height); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C (chained with next rule) | |
CO=cookie (set specified cookie) | |
E=var:value (set environment variable var to value) | |
F (forbidden - sends a 403 header to the user) | |
G (gone - no longer exists) | |
H=handler (set handler) | |
L (last - stop processing rules) | |
Last rule: instructs the server to stop rewriting after the preceding directive is processed. | |
N (next - continue processing rules) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$img_src = $modx->getOption('src', $scriptProperties); | |
$img_alt = $modx->getOption('alt', $scriptProperties); | |
$img_width = $modx->getOption('width', $scriptProperties,640); | |
$is_lazy = $modx->getOption('lazy', $scriptProperties, false); | |
$img_class = $modx->getOption('class', $scriptProperties, 'img-fluid'); | |
$colums = $modx->getOption('cols', $scriptProperties, '{"xs":12,"sm":12,"md":8,"lg":6,"xl":6}'); | |
$img_type = $modx->getOption('type', $scriptProperties, 'jpg'); | |
$dataAttr = ''; |
NewerOlder