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
# ~/.asoundrc or /etc/asound.conf | |
# ALSA configuration file | |
##### USAGE ##### | |
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or | |
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA | |
# device names ad described in the next section. | |
##### DEVICE NAMES ##### |
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
#!/bin/bash | |
max=$(cat /sys/class/backlight/intel_backlight/max_brightness) | |
cur=$(cat /sys/class/backlight/intel_backlight/actual_brightness) | |
step=$(($max/20)) | |
case "$1" in | |
video/brightnessup) | |
new=$(($cur+$step)) |
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
#!/bin/bash | |
shopt -s dotglob | |
# use bash strict mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
DPI="${DPI:-120}" |
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
#!/bin/bash | |
shopt -s dotglob | |
# use bash strict mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
if [[ "$#" != "2" ]]; then | |
echo "usage: $0 input.pdf output.pdf" |
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
diff --git Makefile Makefile | |
index 23f4c17..8686fe4 100644 | |
--- Makefile | |
+++ Makefile | |
@@ -1,7 +1,7 @@ | |
tttool: src/*.hs | |
# cabal update | |
- cabal install --only-dependencies | |
- cabal install --bindir=. | |
+ cabal install --jobs --only-dependencies |
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
# assign workspaces to screens | |
workspace 1 output DVI-I-1 | |
workspace 2 output DVI-I-1 | |
workspace 3 output DVI-I-1 | |
workspace 4 output DVI-I-1 | |
workspace 5 output DVI-I-1 | |
workspace 6 output HDMI-0 | |
workspace 7 output HDMI-0 | |
workspace 8 output HDMI-0 | |
workspace 9 output HDMI-0 |
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
module github.com/fd0/termsizewidthtest | |
go 1.15 | |
require golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a |
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
for i in {0..40}; do | |
timestamp=$(date +"%Y-%m-%d 12:00:00" -d "+ ${i} days") | |
echo "==========================================================" | |
echo "run backup on ${timestamp}" | |
./restic backup --quiet --time "${timestamp}" main.go | |
./restic forget --keep-weekly 3 | |
done | |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"golang.org/x/sys/unix" | |
) |
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
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "TearFree" "true" | |
Option "DRI" "3" | |
Option "AccelMethod" "uxa" | |
#Option "AccelMethod" "sna" | |
EndSection |
NewerOlder