- Redirect doi.org to scihub
Details: if URL matches RegEx
/doi.org\/(.*)/ig
then redirect tohttps://sci-hub.se/$1
- TODO: flibusta? Sorry, no. libgen.is!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# FIXME: Untested! | |
function compress() { | |
input="$1" | |
output="$(basename "$input")" | |
command -v lz4 && lz4 -1 "$input" "$output.1.lz4" | |
command -v lz4 && lz4 -9 "$input" "$output.9.lz4" | |
command -v gzip && gzip -1 -k -c "$input" > "$output.1.gzip" | |
command -v gzip && gzip -9 -k -c "$input" > "$output.9.gzip" |
Specially for https://github.com/wangwenx190/framelesshelper - Cross-platform window customization framework for Qt Widgets and Qt Quick. Supports Windows, Linux and macOS.
Calculate lens base curve and diameter based on keratometry readings.
BC and dia calculation algorithm is based on Soft Special Edition – Base Curve.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
perl -pi -e 's/\r\n/\n/g; $rv=1 if $&; END{ exit $1rv }' $1 |