Skip to content

Instantly share code, notes, and snippets.

@esurdam
esurdam / gist:8ef712e8e74f2f539c8f99a6233cbd1b
Created September 21, 2024 09:12 — forked from ShipkaChalk/gist:629fdc42dad781776d2007fc502188f3
Plex Hetzner workaround using Docker.

Hey, here is how you can route all plex traffic via wireguard out of another VPS, this can be used for any container but was inspired by the recent Hetzner block Plex put in place.

And no not all of us are using it for nefarious means, sometimes people don't have room for a home server.

Why docker? I prefer it as it keeps items separated and cleaned. It also allows for quickly moving configurations around from server to server if need be.

  1. Get yourself a VPS. ( If your VPS has a built in firewall like IONOS (but don't use Ionos), then you need to allow through the ports specified in the VPS docker compose)
  2. Install docker ( Do not use snap, follow their offical directions otherwise you may have docker related issues. )
  3. Create this docker-compose.yml
@esurdam
esurdam / install-ffmpeg-amazon-linux.sh
Last active May 25, 2019 04:35 — forked from gboudreau/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@esurdam
esurdam / nginx.default.conf
Last active May 19, 2017 01:41 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php70-fpm
# Install PHP extensions
sudo yum install -y php70-devel php70-mysql php70-pdo \
php70-pear php70-mbstring php70-cli php70-odbc \
@esurdam
esurdam / bm.rb
Created December 21, 2016 23:38 — forked from thejefflarson/bm.rb
poor man's benchmark
def measure
t = Time.now
yield
puts Time.now - t
end
@esurdam
esurdam / MIU.agda
Created August 3, 2016 02:05 — forked from gergoerdi/MIU.agda
The "MI to MU" puzzle from GEB
module MIU where
data Symbol : Set where
I : Symbol
U : Symbol
open import Data.List
Word : Set
Word = List Symbol
@esurdam
esurdam / MIU.agda
Created August 3, 2016 02:05 — forked from gergoerdi/MIU.agda
The "MI to MU" puzzle from GEB
module MIU where
data Symbol : Set where
I : Symbol
U : Symbol
open import Data.List
Word : Set
Word = List Symbol
@esurdam
esurdam / meta-tags.md
Last active July 14, 2016 04:19 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@esurdam
esurdam / nginx.conf
Created July 9, 2016 00:15 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@esurdam
esurdam / gist:406b8158895191eda0546d42027d24b9
Last active July 12, 2016 05:23 — forked from ericandrewlewis/gist:95239573dc97c0e86714
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@esurdam
esurdam / Enhance.js
Created December 17, 2015 13:16 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {