Skip to content

Instantly share code, notes, and snippets.

View jarmuszz's full-sized avatar

Mariusz jarmuszz

  • 02:31 (UTC +02:00)
View GitHub Profile
#!/bin/sh
# epb - Intel Performance and Energy Bias Hint (EPB) control
usage() {
printf '%s: [-p | -P | -s | -n value]\n' "$(basename $0)" >&2
}
panic() {
printf "$1\n" ${@#"$1"}
usage
@jarmuszz
jarmuszz / lwn.sh
Created August 28, 2023 18:09
Quick & dirty LWN.net Weekly Edition downloader
#!/bin/sh
set -e
ARTICLE_URL="https://lwn.net/Articles"
ARTICLE_DL_DIR="${HOME}/docs/articles/lwn"
ARTICLE_ID="$(date -I)S$(date +%S)"
usage() {
cat <<EOF
$(basename $0): (URL | ARTICLE_NUMBER)
#!/bin/sh
. ~/.cache/wal/colors.sh
fgd="%{F${foreground}}"
bgd="%{B${background}}"
accent="%{F${color1}}"
bullet="${accent}*${fgd}"
colon="${accent}:${fgd}"
percent="${accent}%${fgd}"