This is a collection of short shell scripts I have added to my
PATH
variable to run from anywhere.
To add these to your PATH
, clone the repo and add the following
to your bashrc
or zshrc
, replacing <python-scripts>
with the location of the cloned repository.
Furthermore, see my dotfiles repo for my
complete Mac and Linux system configurations.
# Add additional directories to the path.
pathadd() {
[ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]] && PATH="${PATH:+"$PATH:"}$1"
}
pathadd <python-scripts>/python2.7
pathadd <python-scripts>/python3
Takes a PDF of slides as input and outputs them tiled in a 2x2 landscape PDF.
Linux computers can be used as an alarm clock with a program called
rtcwake, which will sleep the computer until a specifed time.
alarm.sh
is a simple wrapper around rtcwake
to infer the
full data given a time.
For example, the following command will sleep the computer until the
next occurring 7PM.
alarm.sh 7:00PM
Use tcpflow and foremost to analyze TCP streams in a pcap file. For example, the following command automatically analyzes a pcap file.
analyze-pcap.sh traffic.pcap
Compares the files in 2 directories and
detects duplicates based on MD5 checksums.
For example, the following command compares the
files in test_dir1
and test_dir2
.
./compare-dirs.sh test_dir1 test_dir2
Creating checksums for files in dir1.
Checking files in dir2.
md5: 60b725f10c9c85c70d97880dfe8191b3
dir1: test_dir1/a
dir2: test_dir2/a_renamed
md5: 3b5d5c3712955042212316173ccf37be
dir1: test_dir1/b
dir2: test_dir2/b
Create a pdf document from a plaintext document, with optional source code highlighting.
./createpdf.sh main.cpp c++
Send a notification when there are postponed messages in mutt.
Plaintext timesheet management.