From 45330a58eafdab9392ac8f0c56b39492aad9d1a5 Mon Sep 17 00:00:00 2001 From: giomba Date: Fri, 6 Mar 2020 15:58:17 +0100 Subject: [PATCH] First commit --- check-cpu-throttle.sh | 3 +++ cuesplit.sh | 7 +++++++ nat-start.sh | 6 ++++++ pdf-bw.sh | 3 +++ 4 files changed, 19 insertions(+) create mode 100755 check-cpu-throttle.sh create mode 100755 cuesplit.sh create mode 100755 nat-start.sh create mode 100755 pdf-bw.sh diff --git a/check-cpu-throttle.sh b/check-cpu-throttle.sh new file mode 100755 index 0000000..5dd6ff1 --- /dev/null +++ b/check-cpu-throttle.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | paste -s | awk '{print $1/$2}' diff --git a/cuesplit.sh b/cuesplit.sh new file mode 100755 index 0000000..de05b1c --- /dev/null +++ b/cuesplit.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +FLAC=$(find . -iname "*.flac") +CUE=$(find . -iname "*.cue") + +shnsplit -f "$CUE" -t "%n %t" "$FLAC" + diff --git a/nat-start.sh b/nat-start.sh new file mode 100755 index 0000000..af8c71f --- /dev/null +++ b/nat-start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE +iptables -P FORWARD ACCEPT +sysctl -w net.ipv4.ip_forward=1 + diff --git a/pdf-bw.sh b/pdf-bw.sh new file mode 100755 index 0000000..e159d36 --- /dev/null +++ b/pdf-bw.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +convert -density 300 -colorspace GRAY "$1" "$1.gray.pdf"