Skip to content

Instantly share code, notes, and snippets.

View shubhamoy's full-sized avatar
🎯
Focusing

Shubhamoy shubhamoy

🎯
Focusing
View GitHub Profile
@shubhamoy
shubhamoy / cloudflare_only.sh
Created March 19, 2018 12:34 — forked from ninjatrench/cloudflare_only.sh
Script (For Linux Servers) to Prevent Real IP address Leak Protected Behind CloudFlare
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "[-] This script must be run as root [-]"
exit 1
fi
echo "[+] Reseting Initiated [+]"
ufw disable
echo "[?] Current Status [?]"
ufw status numbered verbose
@shubhamoy
shubhamoy / docker-ps-vertical
Last active January 9, 2018 10:33 — forked from wzulfikar/docker-ps-vertical
vertical format for docker ps
export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"
Usage: docker ps --format=$FORMAT
For persistence, we need to add this the shell configuration file. Like for OhMyZSH, we will do as follows:
echo 'export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"' >> ~/.zshrc
source ~/.zshrc