Skip to content

Instantly share code, notes, and snippets.

View hongkongkiwi's full-sized avatar
🤓

Andy hongkongkiwi

🤓
View GitHub Profile
@mihow
mihow / load_dotenv.sh
Last active July 18, 2025 07:10
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active August 27, 2024 08:46
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@rtfpessoa
rtfpessoa / openvpn-client-key-gen.sh
Last active April 16, 2022 19:25
OpenVPN Client Key Generator
#!/bin/bash
#
# OpenVPN Client Key Generation Script
#
# Author: rtfpessoa
# Date: 03-09-2016
#
# Based on the guide:
# * https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
@t413
t413 / update.sh
Created July 23, 2016 00:11
manage a OpenWRT LetsEncrypt https instalation
#!/usr/bin/env sh
## update.sh - manage a OpenWRT LetsEncrypt https instalation
# HOWTO:
# - put update.sh in its own directory (like /root/.https)
# - run ./update.sh your.domain.com (that domain needs to point to your router)
# * this get an issued cert from letsencrypt.org using the webroot verification method
# * also installs curl and ca-certificates packages
# - use crontab -e; add the line `0 0 * * * "/root/.https/update.sh" >>/root/.https/log.txt 2>&`
# * this runs the update every day, logging everything to log.txt
#
@pinglamb
pinglamb / ddns-start
Created June 12, 2016 11:00
Cloudflare ASUS Custom DDNS Script
#!/bin/sh
EMAIL= # Your Email
ZONEID= # Your zone id, hex16 string
RECORDID= # You DNS record ID, hex16 string
RECORDNAME= # Your DNS record name, e.g. sub.example.com
API= # Cloudflare API Key
IP=${1}
curl -fs -o /dev/null -XPUT "https://api.cloudflare.com/client/v4/zones/$ZONEID/dns_records/$RECORDID" \
@Cysioland
Cysioland / insults.txt
Created December 21, 2015 20:52
All sudo insults from the sources
Just what do you think you're doing Dave?
It can only be attributed to human error.
That's something I cannot allow to happen.
My mind is going. I can feel it.
Sorry about this, I know it's a bit silly.
Take a stress pill and think things over.
This mission is too important for me to allow you to jeopardize it.
I feel much better now.
Wrong! You cheating scum!
And you call yourself a Rocket Scientist!
anonymous
anonymous / generate_certs
Created December 5, 2015 13:31
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LETSENCRYPT="/usr/local/letsencrypt/letsencrypt-auto"
DOMAINS="home.savage.hk,couchpotato.home.savage.hk,cp.home.savage.hk,sonarr.home.savage.hk,sonar.home.savage.hk,synology.home.savage.hk,nas.home.savage.hk"
#DOMAINS="home.savage.hk,couchpotato.home.savage.hk,sonarr.home.savage.hk"
EMAIL="[email protected]"
WEBROOT_PATH="/tmp/letsencrypt-auto"
@SAPikachu
SAPikachu / firewall-start.sh
Last active May 24, 2022 12:09
Custom guest wireless network on ASUS RT-AC68U (Merlin firmware)
#!/bin/sh
# /jffs/scripts/firewall-start
# A VM in VLAN 1111 (tagged) is plugged to port 1, it will act as router of guest network, offer DHCP, and do other filtering as necessary
# Port 5 (internal CPU port) has to be included to make it works
robocfg vlan 1111 ports "1t 5t"
# Bring up VLAN interface
ip link add link eth0 name vlan1111 type vlan id 1111
@hazcod
hazcod / uploader.sh
Last active August 26, 2019 19:03
Uploader script to upload media to acd_cli via cron
#!/bin/bash
#set -e
#set -x
# where to log
log="/var/log/uploader.log"
# where to keep our PIDs
tmp="/tmp/uploader"
# where is the unencrypted encfs

Docker Container Name

A one paragraph description about the container.

Getting Started

These instructions will cover usage information and for the docker container

Prerequisities