Skip to content

Instantly share code, notes, and snippets.

View openvpn-server-example.conf
port 443 #Listen on port 443 - change if you like
proto tcp #Use TCP - change to UDP if you prefer
dev tun #Use tun interface - this is recommeded for most use cases
ca ca.crt #Read CA cert/pub key from ca.crt (not-secret)
cert server.crt #Read server cert/pub key from server.crt (not-secret)
key server.key #Read server private key from server.key (SECRET!)
dh dh2048.pem #Read Diffie Hellan (DH) parms from db2048.pem
server 10.8.0.0 255.255.255.248 #IP range for clients - change if you like
push "topology subnet" #Recommended topology
ifconfig-pool-persist ipp.txt #Will try give the same ip to clients every connection
View gist:73cca37d54878c88c76f7f55185d2080
input {
tcp {
port => 5000
type => syslog
}
udp {
port => 5000
type => syslog
}
}
View gist:7ac269b65cc2f0af2c6b0ec4d14ca69c
grep -v '^$\|^\s*#'
#consider setting up an alias in ~/.bash_aliases for example
alias db="grep -v '^$\|^\s*#'"
View gist:8e45c6e3b95ea48fd5097b1425f793e7
input {
tcp {
port => 5000
type => syslog
}
udp {
port => 5000
View gist:cfd08a65aba77a285290989ddb7813ec
version: ‘2’
services:
elasticsearch:
build: elasticsearch/
volumes:
– ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
– ./elasticsearch/data:/usr/share/elasticsearch/data
ports:
– “9200:9200”
View kegbot_db_cleaner.py
import sqlite3 #Import the SQLite3 module
import sys
commit = False
try:
sqlite_file = sys.argv[1]
except:
print "You must specify a sqlite db file as an argument."
quit()
View kegbot_db - sql queries.sql
# Purpose:
# SELECT: All DRINKS of a specific Keg
# OUTPUT: Drink ID, Day of Week, Date and time (localtime),
# SORTED BY: Volume_ml
select id, substr('SunMonTueWedThuFriSat', 1 + 3*strftime('%w', datetime(time, "localtime")), 3), datetime(time, "localtime"), volume_ml from core_drink where keg_id=61 ORDER BY volume_ml;
# Purpose:
# SELECT: All DRINKS of a specific Keg ONLY if weekday (Mon-Fri)
# OUTPUT: Drink ID, Day of Week, Date and time (localtime)
@dboyd13
dboyd13 / gist:b1e15425a55279f6a0c34e7cce7e0b55
Created Aug 11, 2019
Micronta (Model: 63-7008) - Set date / time
View gist:b1e15425a55279f6a0c34e7cce7e0b55
For a Micronta (Model: 63-7008). Adjust the date/time as follows:
1) Press and HOLD the 'C / mode' button (bottom right) until 'AL' appears.
2) Press the 'C / mode' button again (Short press)
3) You are now in the set time mode. Move positions by pressing 'X', adjust position value by pressing '-' (minus)
4) Once you've set the time, Move to the calendar positions using the same 'X' key
5) Once complete, press the 'C / mode' button to return to the standard time display.
@dboyd13
dboyd13 / aws-solution-architect-associate-study-notes
Last active Jul 1, 2020
AWS Solution Architect Associate Study Notes (Late 2017, Early 2018)
View aws-solution-architect-associate-study-notes
___ _____ ___ _ _ _ _ _ _ _ _ _ _ _
/_\ \ / / __| ___ / __| ___| |_ _| |_(_)___ _ _ /_\ _ _ __| |_ (_) |_ ___ __| |_ /_\ ______ ___ __(_)__ _| |_ ___
/ _ \ \/\/ /\__ \ |___| \__ \/ _ \ | || | _| / _ \ ' \ / _ \| '_/ _| ' \| | _/ -_) _| _| / _ \ (_-<_-</ _ \/ _| / _` | _/ -_)
/_/ \_\_/\_/ |___/ |___/\___/_|\_,_|\__|_\___/_||_| /_/ \_\_| \__|_||_|_|\__\___\__|\__| /_/ \_\/__/__/\___/\__|_\__,_|\__\___|
Notes taken between Dec-2017 and Jan-2018, from acloud.guru and AWS FAQs.
Solution Architect Associate - Need to Know:
View example-onc.file
{
"Type":"UnencryptedConfiguration",
"Certificates": [ {
"GUID": "{<GUID#1>}",
"Type": "Authority",
"X509": "<CA_CERT>"
} ],
"NetworkConfigurations": [ {
"GUID": "{<GUID#2>}",
"Name": "<VPN_NAME>",