Skip to content

Instantly share code, notes, and snippets.

@shikendon
shikendon / ddos-mitigation-notes.md
Last active November 8, 2023 10:34
Best Practices for DDoS Protection and Mitigation on Linux
@shikendon
shikendon / debian-bootstrap.sh
Last active March 7, 2024 15:23
Generate 4 vertically panes tmux.conf
#!/bin/bash
# Author: Shi-Ken Don <[email protected]>
# Source: https://git.io/debian-bootstrap.sh
# License: MIT
set -e
sudo -V > /dev/null || apt -y install sudo
curl -fsSL git.io/vpeYx | sed 's/eth0/enp1s0/' | bash
@shikendon
shikendon / build-mmproxy.sh
Last active January 31, 2019 20:44
Build mmproxy on CentOS 7
#!/usr/bin/env bash
set -e
cat <<'END' | sudo tee /etc/yum.repos.d/epel-alonid-llvm.repo
[epel-alonid-llvm-3.9.0]
name=Copr repo for llvm-3.9.0 owned by alonid
baseurl=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/epel-7-$basearch/
type=rpm-md
enabled=0
gpgkey=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/pubkey.gpg
@shikendon
shikendon / deploy-consul-agent.sh
Last active August 26, 2023 15:11
Debian network optimization scripts. (Development)
#!/bin/bash
# Author: Shi-Ken Don <[email protected]>
# Source: https://git.io/deploy-consul-agent.sh.dev
# License: MIT
set -e
sudo -V > /dev/null || apt -y install sudo
sudo apt -y install consul
@shikendon
shikendon / deploy-google-bbr.sh
Last active March 1, 2024 09:52
Debian network optimization scripts.
#!/bin/bash
# Author: Shi-Ken Don <[email protected]>
# Source: https://git.io/deploy-google-bbr.sh
# License: MIT
set -e
sudo -V > /dev/null || apt -y install sudo
if [[ ! -e /etc/sysctl.d/11-google-bbr.conf ]]; then
@shikendon
shikendon / config.yml
Last active March 21, 2024 06:39
Deploy a simple Minecraft proxy server.
# Change your BungeeCord configuration to enable PROXY Protocol.
listeners:
- host: 0.0.0.0:25577
proxy_protocol: true
#!/usr/bin/env python
"""Extend Python's built in HTTP server to save files
curl or wget can be used to send files with options similar to the following
curl -X PUT --upload-file somefile.txt http://localhost:8000
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt
__Note__: curl automatically appends the filename onto the end of the URL so