Skip to content

Instantly share code, notes, and snippets.

View pmirshad's full-sized avatar

Irshad Pananilath pmirshad

  • Kozhikode, Kerala
View GitHub Profile
@andyrbell
andyrbell / scanner.sh
Last active March 28, 2025 17:57
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
#! /bin/bash
usage() {
echo "measureTraffic.sh <targetIP>"
}
if [ -z "$1" ]; then
usage
exit 1
fi
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 2, 2025 20:37
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...]
@phhusson
phhusson / AppsOverADB.kt
Created February 2, 2021 21:33
Remote control apps running on a smartphone
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@aojea
aojea / README.md
Last active April 2, 2025 00:09
Navigating Linux Network Namespaces and Interfaces

Navigating Linux Network Namespaces and Interfaces

Network namespaces create isolated network stacks, including network devices, IP addresses, routing tables, rules , ... This separation is crucial for containerization.

Network namespaces also contain network devices that can live exactly on one network namespace:

physical network device can live in exactly one network namespace. When a network namespace is freed (i.e., when the last