Skip to content

Instantly share code, notes, and snippets.

View vvdaal's full-sized avatar

Vince van Daal vvdaal

  • Netherlands
  • 10:49 (UTC +02:00)
View GitHub Profile
@vvdaal
vvdaal / example-ingress-traefik.yaml
Last active January 5, 2023 14:28
This shows a working example of a traefik-config.yaml override for k3s, this should be stored in /var/lib/rancher/k3s/server/manifests and allows letsencrypt via a web httpChallenge. The resolver is named letsencryptweb.
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
namespace: apps
name: example-ingress
spec:
entryPoints:
- websecure
routes:
- match: Host(`your-own-awesome-domain.com`)
@vvdaal
vvdaal / fix_hosts_google_shell.sh
Last active May 21, 2021 07:59
Bash script for fixing the IPv6 issue with Terraform on Google Cloud Shell
#!/bin/bash
#
#Make root the owner of this file and execute in your .bashrc with sudo ./fix_hosts_google_shell.sh
#Make sure sudo uses passwordless auth
#
if grep -q "googleapis.com" /etc/hosts
then
echo "Googleapis detected in /etc/hosts, skipping bug workaround for connectivity"
exit 1
#Exists so exit script
@vvdaal
vvdaal / ark_online_spoilage.json
Created April 26, 2020 23:09
Spoilage for each Item type in JSON format. Made from https://ark.gamepedia.com/Spoilage#Foods
{
"foods": {
"berries":
{
"player_inventory": 600,
"tamed_dino_or_trough": 2400,
"preserving_bin": 6600,
"refrigerator": 60000,
"crop_plot": 120000
},
@vvdaal
vvdaal / gist:a3991293b47a5a8c6e7bc394ef5d8048
Created April 17, 2020 17:50
Nginx config to reverse proxy to something that uses SSL
server_name www.servername1.tld servername1.tld;
access_log /var/log/nginx/www.servername1.tld_access.log;
error_log /var/log/nginx/www.servername1.tld_error.log;
location / {
proxy_pass https://YOUR-IP-ADDRESS-OF-BACKEND;
proxy_set_header Host $host;
proxy_ssl_name $host;
proxy_ssl_verify off;
proxy_ssl_server_name on;
@vvdaal
vvdaal / multicheck.sh
Last active August 20, 2018 11:00
Performs a ping, traceroute, nslookup and telnet (port 80 and 21) Usage: ./multicheck.sh www.site_to_check.com 2>&1 | tee multicheck.log
#!/bin/bash
echo "********************************************************"
echo "BEGINNING PING TO $1"
echo "********************************************************"
echo "Command: ping -c 10 $1"
ping -c 10 $1
wait
echo "********************************************************"
echo "BEGINNING NSLOOKUP TO $1"
echo "********************************************************"
@vvdaal
vvdaal / firewall.sh
Last active May 12, 2018 15:58
Firewall script - Setups very restrictive firewall IPv4 and IPv6
#!/bin/bash
IPT="/sbin/iptables"
IPV6=true
IPTV6="/sbin/ip6tables"
# Your DNS servers you use: cat /etc/resolv.conf
# IPv6 DNS not supported in this script
DNS_SERVER="67.207.67.3 67.207.67.2"
# Allow connections to this package servers