Skip to content

Instantly share code, notes, and snippets.

@goofrider
goofrider / multipass-resize.md
Last active May 17, 2023 04:52
Changing CPU/hard disk/RAM size of a multipass instance

How to resize hard disk of a multipasss instance on osx

(see canonical/multipass#62)

    # if you have Docker Desktop installed
    
    sudo /Applications/Docker.app/Contents/MacOS/qcow-tool resize --size=$(( 15 * 1024**3 )) /var/root/Library/Application\ Support/multipassd/vault/instances/ubuntu20/ubuntu-20.04-server-cloudimg-amd64.img 

or

@goofrider
goofrider / rm-frontmatter.js
Last active May 18, 2023 18:30
Regex for Removing YAML Front Matter before processing Jekyll file in Gulp
// taken from https://codepen.io/tech4him1/pen/dNyydZ
var replace = require('gulp-replace');
// Regex to recognize YAML Front Matter (at beginning of file, 3 hyphens, than any charecter, including newlines, then 3 hyphens).
var YAMLFrontMatter = /^---[.\r\n]*---/;
gulp.src('./!(_)**/*.md')
.pipe(replace(YAMLFrontMatter, ''))
.pipe(gulp.dest('./'));
@goofrider
goofrider / LinkAgg
Created June 28, 2023 02:09
Link aggregation script for Asuswrt-Merlin
#!/bin/sh
# Written By KAD
# Dynamic Link Aggregation Setup
# Version 1.5
# see https://github.com/RMerl/asuswrt-merlin.ng/wiki/Link-Aggregation
Help()
{
echo -e "\n---- Link Aggregation Version 1.5 Help ----"
echo -e "\nDynamically enable Link Aggregation using 802.3ad"