Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile
@josephbolus
josephbolus / config.boot
Created February 5, 2018 08:01 — forked from max-mapper/config.boot
edgerouter lite centurylink fiber pppoe configuration
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to internal"
@josephbolus
josephbolus / Instructions.txt
Created December 2, 2018 12:23 — forked from NotMedic/Instructions.txt
Siri -> HomeBridge -> HomeBridge-ssh -> iptables
This is a pretty simple setup:
Siri is used to control Homebridge using the HomeKit protocol.
Homebridge has a module named Homebridge-ssh that allows you to run commands over ssh.
There is a shell script on an OpenWrt box to enable, disable, and check the status of a MAC Address block in the FORWARD table.
1. Install node on your platform. I went with 8.9 for no specific reason other than I initially had issues with 10 that probably weren't related..
2. Install homebridge and homebridge-ssh. You should probably also put hombridge-config-ui-x on there too... I used the unsafe-perm parameter after getting a significant number of errors:
sudo -i npm install -g homebridge --unsafe-perm
sudo -i npm install -g homebridge-ssh --unsafe-perm
@josephbolus
josephbolus / add_ssl_to_cloudkey.txt
Last active August 13, 2019 04:31 — forked from potto007/add_ssl_to_cloudkey.txt
Set up Free SSL with Ubiquiti UniFi Cloud Key -- follow instructions in `add_ssl_to_cloudkey.txt`
1) Login to Cloud Key
2) Cloud Key ssh: `curl https://get.acme.sh | sh`
3) Cloud Key ssh: `acme.sh --upgrade --auto-upgrade --accountemail "myemail@example.com"`
4) Cloud Key ssh: Add `cloudkey-renew-hook.sh` file to `/root/.acme.sh`
5) Create free CloudFlare account (if not already member)
6) Login to CloudFlare
7) On CloudFlare: Create a zone for a domain you own (can add a cheap domain with namecheap.com or any number of alternatives)
8) On CloudFlare: Create an A record for your Cloud Key; ie: unifi.CHANGE.ME, 192.168.1.10
9) On UniFi Controller: Go to Settings; Click "Controller"; Change "Controller Hostname/IP" to the name entered in step 8.
10) On CloudFlare: go to Overview for your zone; click "Get your API key"
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@josephbolus
josephbolus / script-template.sh
Created December 15, 2020 18:12 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@josephbolus
josephbolus / The Technical Interview Cheat Sheet.md
Created March 20, 2021 16:23 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@josephbolus
josephbolus / default.conf
Created June 16, 2022 21:43 — forked from flox1an/default.conf
nginx config that uses the oauth2-proxy (via auth_request) to authenticate against gitlab and then proxies all requests to a backend service while setting the auth headers X-User and X-Email
server {
listen 80;
server_name localhost;
location /oauth2/ {
proxy_pass http://oauth-proxy:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
@josephbolus
josephbolus / Caddyfile
Created July 22, 2022 05:15 — forked from dimasahmad/Caddyfile
Install Caddy 2 on Ubuntu
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
:80
reverse_proxy 10.100.100.1:80
@josephbolus
josephbolus / Caddy.env
Created July 23, 2022 06:44 — forked from crazy-max/Caddy.env
Proxmox web interface through Caddy as reverse proxy with Let's Encrypt
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_HOSTED_ZONE_ID=
@josephbolus
josephbolus / socks.txt
Last active November 14, 2023 18:00 — forked from jasdeepkhalsa/socks.txt
Configuring a SOCKS proxy server in Chrome
From: http://www.chromium.org/developers/design-documents/network-stack/socks-proxy
To configure chrome to proxy traffic through the SOCKS v5 proxy server myproxy:8080, launch chrome with these two command-line flags:
--proxy-server="socks5://myproxy:8080"
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
The first thing to check when debugging is look at the Proxy tab on about:net-internals, and verify what the effective proxy settings are:
chrome://net-internals/#proxy