Skip to content

Instantly share code, notes, and snippets.

@tongpu
tongpu / github-raw-function.zsh
Created October 16, 2019 07:57
A simple shell function to replace /blob/ with /raw/ in a GitHub URL to download the raw file
function github-raw() {
# replace /blob/ in the GitHub URL with /raw/
curl --silent --location --remote-name ${1:s#/blob/#/raw/#}
}
BEGIN MESSAGE.
t3mgI6JrauGZiGl A8FLki7GtYubR6h yI1J3t2ZcjWKSAc bOO5fXFJTN7vgir
mZbvqTXhK7zv2Mj j6sHV4Uk8mHTCKq 6Xr2MZHgg75YW0N IGw1wLk8vefU2FL
8a64V7lfCPU9q7K R97D6HVgkYEZfJ8 3N0dxfSwadtINN8 zXrg9PbNo51JZKE
22AhBA69qRTUKSq nHVEKyst6WRvqaV 1NJxK21.
END MESSAGE.