This file contains 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
// ==UserScript== | |
// @name noVNC Paste for Proxmox | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2a | |
// @description Pastes text into a noVNC window (for use with Proxmox specifically) | |
// @author Chester Enright | |
// @match https://* | |
// @include /^.*novnc.*/ | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @grant none |
This file contains 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
# NOTE: While AdGuard Home may be configured as a DHCP server, this is out | |
# out of scope for this docker-compose.yml file. Configuring the DHCP | |
# server requires using 'network_mode: host'. | |
# | |
# If you want to use the DHCP server feature, delete the 'network:' | |
# section (lines 20 & 21), as well as the entire 'ports:' section | |
# (lines 30 - 47). Then, just below the 'restart:' section (line 19) | |
# insert a line that reads 'network_mode: host'. The container will | |
# still reserve all the ports listed below, as well as 67 and 68 for | |
# DHCP, but there's no need to map them in the docker-compose.yml file |
This file contains 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/sh | |
######################################################################################## | |
# Compresses old radacct detail files and removes very old compressed radacct files. | |
######################################################################################## | |
# Author: P. Tomulik | |
######################################################################################## | |
# Path to the programs used (for environments without $PATH set) | |
FIND=/usr/bin/find |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
This file contains 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 | |
SLEEP=120 | |
MAX_CONN=20 | |
MY_IP=0.0.0.0 # Configure your IP here | |
while true; do | |
( | |
echo "create table ips (ip string);" | |
echo 'begin transaction;' | |
netstat -an | grep -v ESTABLISHED | grep ${MY_IP}:80 | awk '{print $5}' | cut -f4 -d: | while read IP; do |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect
NewerOlder