Skip to content

Instantly share code, notes, and snippets.

View versionsix's full-sized avatar
🦖
Using modern software.

Frank Meeusen versionsix

🦖
Using modern software.
  • Belgium, Antwerp
View GitHub Profile
@versionsix
versionsix / bluetooth_sleep.lua
Created September 23, 2021 14:11 — forked from ysimonson/bluetooth_sleep.lua
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
require "string"
function checkBluetoothResult(rc, stderr, stderr)
if rc ~= 0 then
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout))
end
end
function bluetooth(power)
print("Setting bluetooth to " .. power)
@versionsix
versionsix / generate_directory_index_caddystyle.py
Last active April 28, 2021 18:42 — forked from glowinthedark/generate_directory_index_caddystyle.py
Generate directory index (recurse subfolders with `-r` or `--recursive`). Use `-h` or `--help` for all options
#!/usr/bin/env python3
# ---
# Copyright 2020 glowinthedark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
@versionsix
versionsix / docker_l3_routed_ipvlan.md
Created April 10, 2021 05:26
Docker ipvlan use a routed subnet.
❯ multipass launch \
  -m 8G \
  -c 4 \
  -d 30G \
  --name dockrr \
    focal
Launched: dockrr
#!/bin/bash
#####################################################################################################
# Script_Name : xrdp-installer-1.2.2.sh
# Description : Perform xRDP installation on Ubuntu 16.04,18.04,20.4,20.10 and perform
# additional post configuration to improve end user experience
# Date : December 2020
# written by : Griffon
# WebSite :http://www.c-nergy.be - http://www.c-nergy.be/blog
# Version : 1.2.2
# History : 1.2.2 - Changing Ubuntu repository from be.archive.ubuntu.com to archive.ubuntu.com
@versionsix
versionsix / HowTo
Created December 14, 2020 14:51 — forked from s3rj1k/HowTo
Ubuntu 20.04.1 AutoInstall
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
wget https://ubuntu.volia.net/ubuntu-releases/20.04.1/ubuntu-20.04.1-live-server-amd64.iso
# Create ISO distribution dirrectory:
@versionsix
versionsix / pa-example-config.xml
Created November 14, 2019 12:55
Palo alto example config. mgmt: 192.168.123.99/24 admin | P@ssw0rd
<config version="8.0.0" urldb="paloaltonetworks">
<mgt-config>
<users>
<entry name="admin">
<phash>$1$l2.doqhj$Vri/RkbGRnVW2yjB.xV6O0</phash>
<permissions>
<role-based>
<superuser>yes</superuser>
</role-based>
</permissions>
@versionsix
versionsix / cloud-init.cfg .yaml
Last active April 18, 2024 10:57
[Cloud-Init] User-Data for auto root login
%YAML 1.2
---
#cloud-config
disable_root: false
ssh_pwauth: True
chpasswd:
list: |
root:toor
expire: False
users:
@versionsix
versionsix / legacy-free-ubuntu.sh
Created August 7, 2019 11:09
Legacy free openstack images
wget -O /var/lib/libvirt/images/ubuntu-bionic.qcow2 https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
cat <<EOF > 51-vga.cfg
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 vga=789"
EOF
virt-copy-in -a /var/lib/libvirt/images/ubuntu-bionic.qcow2 51-vga.cfg /etc/default/grub.d
virt-customize -v -a /var/lib/libvirt/images/ubuntu-bionic.qcow2 \
--run-command "update-grub" \
--run-command "apt -yqq update && apt -yqq upgrade" \
--run-command "apt -y -qq --no-install-recommends install jq dnsutils && apt -y autoremove" \
--run-command "mkdir -p /etc/systemd/system/getty@tty1.service.d && mkdir -p /etc/systemd/system/serial-getty@ttyS0.service.d && mkdir -p /etc/cloud/cloud.cfg.d/"
@versionsix
versionsix / legacy_free.sh
Created March 9, 2019 15:16
legacy free qcow2 images
#!/bin/bash
DATE=`date +%Y%m%d`
DATE='latest'
IMAGES_DIR='/var/lib/libvirt/images'
CLOUDIMAGE_FEDORA29='https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2'
CLOUDIMAGE_UBUNTU1804='https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img'
CLOUDIMAGE_CENTOS7='https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2c'
CLOUDIMAGE_DEBIAN='http://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2'
dnf -qy install bridge-utils libvirt virt-install qemu-kvm libguestfs-tools cloud-utils python-glanceclient python-openstackclient jq
# Fedora Images