Skip to content

Instantly share code, notes, and snippets.

#!/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
@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
@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 / 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 / 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 / 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 / ddos-mitigation-notes.md
Last active November 8, 2023 10:34
Best Practices for DDoS Protection and Mitigation on Linux
@shikendon
shikendon / vscode-user-settings.js
Last active August 23, 2022 11:58
My settings for Visual Studio Code
// Place your settings in this file to overwrite the default settings
// Extensions:
// - ESLint
// - Material Icon Theme
// - Material Theme Kit
// - Ruby
// - stylelint
{
"editor.scrollBeyondLastLine": false,
"editor.tabSize": 2,
@shikendon
shikendon / uptimerobot_discord.js
Last active April 21, 2021 11:52
Uptime Robot Discord integrations
// Alert Contact Type: Web-Hooks
// URL to Notify: https://discordapp.com/api/webhooks/{WEB_HOOK_ID}/{TOKEN}?
// POST Value (JSON Format):
{
"content": "Monitor is *alertTypeFriendlyName*: *monitorFriendlyName* ( *monitorURL* )\n```*alertDetails*```"
}
@shikendon
shikendon / start-fcrackzip.sh
Created April 1, 2017 07:22
Achieve fcrackzip parallel cracking by using xargs
logfile=$(date +%Y%m%d%H%M).log
targetfile=test.zip
# Start 1 processes for cracking mixalpha-numeric maximum 5 digits
fcrackzip -c Aa1 -b -l 1-5 --verbose -u $targetfile & >> $logfile &
# Start 62 processes for cracking mixalpha-numeric equal to 6 digits
eval echo\ {A..Z}AAAAA\; | xargs -I % -P 26 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &
eval echo\ {a..z}AAAAA\; | xargs -I % -P 26 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &
eval echo\ {0..9}AAAAA\; | xargs -I % -P 10 fcrackzip -c Aa1 -b -p % --verbose -u $targetfile >> $logfile &