Skip to content

Instantly share code, notes, and snippets.

View VeloAddict's full-sized avatar
🚴‍♂️
spinning

Robert VeloAddict

🚴‍♂️
spinning
View GitHub Profile
@VeloAddict
VeloAddict / netplan2NM.sh
Created March 24, 2022 20:06 — forked from poltpolt/netplan2NM.sh
Change Ubuntu 20.04 server netplan to use NetworkManager instead of networkd
#!/usr/bin/env bash
# netplan2NM.sh
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces
echo 'Changing netplan to NetowrkManager on all interfaces'
# backup existing yaml file
cd /etc/netplan
cp 00-installer-config.yaml 00-installer-config.yaml.orig
do_expand_rootfs() {
ROOT_PART="$(findmnt / -o source -n)"
ROOT_DEV="/dev/$(lsblk -no pkname "$ROOT_PART")"
PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")"
# NOTE: the NOOBS partition layout confuses parted. For now, let's only
# agree to work with a sufficiently simple partition layout
if [ "$PART_NUM" -ne 2 ]; then
whiptail --msgbox "Your partition layout is not currently supported by this tool. You are probably using NOOBS, in which case your root filesystem is already expanded anyway." 20 60 2
@VeloAddict
VeloAddict / medium_clap.html
Created September 18, 2019 18:21 — forked from JonathanDn/medium_clap.html
Medium Clap Reproduction - My take on it by looking, researching and trial & error. Demo available --> https://jsfiddle.net/urft14zr/425/
<div class="canvas">
<div id="totalCounter" class="total-counter"></div>
<div id="clap" class="clap-container">
<i class="clap-icon fa fa-hand-paper-o"></i>
</div>
<div id="clicker" class="click-counter">
<span class="counter"></span>
</div>
@VeloAddict
VeloAddict / ghostPlugin.js
Created November 10, 2018 23:41 — forked from joeylin/ghostPlugin.js
a ghost plugin example
var fs = require('fs'),
path = require('path'),
_ = require('underscore'),
when = require('when'),
express = require('express'),
GhostPlugin = require('../../../core/server/plugins/GhostPlugin'),
knex = require('../../../core/server/models/base').Knex,
KudosPlugin;
KudosPlugin = function (ghost) {