This file contains hidden or 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
/* Fosstodon Hub theme written by Kev Quirk (https://kevq.uk) and released under the GPL v3 license (https://www.gnu.org/licenses/gpl-3.0.en.html). */ | |
/* Import required font */ | |
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&display=swap'); | |
@import url('https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism-tomorrow.min.css'); | |
/* Load PrismJS scripts and CSS */ | |
/* Create colour variables to be used throughout the theme (makes colours easier to change globally). */ |
This file contains hidden or 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
#!/bin/bash | |
# Configure Package Repos | |
cat <<EOF >/etc/apt/sources.list | |
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse | |
deb-src http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse | |
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse | |
deb-src http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse |
This file contains hidden or 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
# Make Ctrl+x Control key | |
unbind C-b | |
set -g prefix C-x | |
bind-key C-x send-prefix | |
# Rename window with C-x-A | |
unbind C-, | |
bind-key A command-prompt 'rename-window %%' | |
# Resize panes easily with Alt/Option |
This file contains hidden or 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
#!/bin/bash | |
#stop logging services | |
/sbin/service rsyslog stop | |
/sbin/service auditd stop | |
#remove old kernels | |
/bin/package-cleanup --oldkernels --count=1 | |
#clean yum cache | |
/usr/bin/yum clean all | |
#force logrotate to shrink logspace and remove old logs as well as truncate logs | |
/usr/sbin/logrotate -f /etc/logrotate.conf |
This file contains hidden or 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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
This file contains hidden or 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
# Add contents to /etc/rc.local.d/local.sh | |
vds_name="vDS" | |
vds_uplink_pg="dvportgroup-82" | |
free_vds_uplink_port=$(esxcli network vswitch dvs vmware list | grep -A 2 "DVPortgroup ID: $vds_uplink_pg" | grep -A 1 'In Use: false' | grep 'Port ID' | awk '{print $NF}' | head -1) | |
vusb0_status=$(esxcli network nic get -n vusb0 | grep 'Link Status' | awk '{print $NF}') | |
count=0 | |
while [[ $count -lt 20 && "${vusb0_status}" != "Up" ]] ] | |
do | |
sleep 10 | |
count=$(( $count + 1 )) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Convert HTML posts that we extract via JQ, into Markdown formatted files (one file per post, title as filename) | |
""" | |
import json | |
import html2text | |
import sys | |
import argparse |
This file contains hidden or 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
#!/bin/bash | |
# Some global variables | |
WGET_BIN='/usr/bin/wget' | |
JQ_BIN='/usr/bin/jq' | |
SED_BIN='/bin/sed' | |
TOOLS_MISSING=0 | |
CHECK_UPDATE_URL='https://plex.tv/api/downloads/1.json' | |
UPDATE_URL='https://plex.tv/downloads/latest/1?channel=16&build=linux-ubuntu-x86_64&distro=ubuntu' | |
ARCHIVE_DIR="${HOME}/plex_archive" |
This file contains hidden or 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
dc1-product-base: | |
provider: vmware-dc1 | |
clonefrom: product-centos7-base | |
devices: | |
cd: | |
CD/DVD drive 1: | |
device_type: client_device | |
mode: passthrough | |
disk: |
This file contains hidden or 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
#!/bin/bash | |
################################################################################ | |
# DigitalOcean Droplet Firewall Script | |
#=============================================================================== | |
# This Firewall script is supposed to be used with DigitalOcean Droplets. It | |
# uses eth0 as external, and eth1 (if present) as internal network interface. | |
# It automatically detects IP addresses and blocks all traffic but SSH from a | |
# list of safe IP addresses. | |
# Two white lists can be defined, one for internal IPv4 IP addresses and one | |
# for public IPv4 addresses. |