Skip to content

Instantly share code, notes, and snippets.

Avatar
🦖
Using modern software.

versionsix

🦖
Using modern software.
View GitHub Profile
@versionsix
versionsix / generate_directory_index_caddystyle.py
Last active Apr 28, 2021 — forked from glowinthedark/generate_directory_index_caddystyle.py
Generate directory index (recurse subfolders with `-r` or `--recursive`). Use `-h` or `--help` for all options
View generate_directory_index_caddystyle.py
#!/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 Apr 10, 2021
Docker ipvlan use a routed subnet.
View docker_l3_routed_ipvlan.md
❯ multipass launch \
  -m 8G \
  -c 4 \
  -d 30G \
  --name dockrr \
    focal
Launched: dockrr
View xrdp.sh
#!/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 Dec 14, 2020 — forked from s3rj1k/HowTo
Ubuntu 20.04.1 AutoInstall
View HowTo
# 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 Nov 14, 2019
Palo alto example config. mgmt: 192.168.123.99/24 admin | P@ssw0rd
View pa-example-config.xml
<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 Nov 26, 2020
[Cloud-Init] User-Data for auto root login
View cloud-init.cfg .yaml
%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 Aug 7, 2019
Legacy free openstack images
View legacy-free-ubuntu.sh
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 Mar 9, 2019
legacy free qcow2 images
View legacy_free.sh
#!/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
@versionsix
versionsix / compile_kernel.sh
Last active Apr 23, 2019
Compile linux 5.0 kernel benchmark
View compile_kernel.sh
#!/bin/bash
mv /root/logs.txt /root/logs_`date +%s`.txt 2>/dev/null || true
exec &> >(tee -a "/root/logs.txt")
systemctl restart systemd-timesyncd
start_time=`date +%s`
export DEBIAN_FRONTEND=noninteractive
echo "==========================================="
echo " UPDATE SYSTEM"
echo "==========================================="
start_time_update=`date +%s`