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 | |
# Shell script to bootstrap Bootstrap... | |
# JS Extra files w/ integrity hashes | |
JQ_URL="https://code.jquery.com/jquery-3.2.1.slim.min.js" | |
JQ_SHA384="KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" | |
POP_URL="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" | |
POP_SHA384="ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" |
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
# Adapted from https://blog.simos.info/how-to-easily-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/ | |
# | |
config: | |
environment.DISPLAY: :0 | |
raw.idmap: both 1000 1000 | |
user.user-data: | | |
#cloud-config | |
runcmd: | |
- 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf' | |
- 'echo export PULSE_SERVER=unix:/tmp/.pulse-native | tee --append /home/ubuntu/.profile' |
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 | |
iptables -A INPUT -p tcp -m multiport --dports 80,443 -s $(curl -sSL --tlsv1.2 'https://www.cloudflare.com/ips-v4' | xargs | sed 's/ /,/g') -j ACCEPT | |
iptables -A INPUT -p tcp -m multiport --dports 80,443 -j REJECT --reject-with tcp-reset | |
ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s $(curl -sSL --tlsv1.2 'https://www.cloudflare.com/ips-v6' | xargs | sed 's/ /,/g') -j ACCEPT | |
ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -j REJECT --reject-with tcp-reset |
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 | |
apt-get update &>/dev/null | |
if [[ "$(lsmod | grep wireguard)" -n ]]; then | |
export HAS_WG_MODULE=1 | |
else | |
apt-get install wireguard wireguard-tools -y &>/dev/null | |
modprobe wireguard | |
fi |
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
# Set up some logging. VERY useful to see why things aren't working. | |
logger_syslog=-1 | |
logger_syslog_level=2 | |
logger_stdout=-1 | |
logger_stdout_level=2 | |
# Which interface to use and which bridge to join | |
interface=wlan0 | |
bridge=br0 |
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 | |
# Hightlights arguments from piped in text | |
cat - | grep --color=auto -E -i "^|$(echo "$*" | sed 's/ /|/g')" |
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
## /etc/apt/apt.conf.d/02proxy | |
# You can add this line for faster failover | |
Acquire::Retries 0; | |
# Make sure you use the full path | |
Acquire::http::Proxy-Auto-Detect "/usr/bin/apt-proxy-detect.sh"; |
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 | |
# Set hidden service directory | |
# | |
hsdir=/var/lib/tor/sshd | |
# Add hidden service config to /etc/tor/torrc | |
# | |
cat >> /tmp/test << __TOR_CONFIG__ | |
HiddenServiceDir $hsdir |
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 | |
# | |
# Accepts a JSON file path as an optional argument, otherwise reads stdin | |
import os | |
import simplejson | |
import sys | |
import yaml | |
# If valid path to json file is passed |
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 | |
grep -Li 'nodisplay=true' /usr/share/applications/*.desktop |