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
# check manual for this setting via | |
# man readline | |
set editing-mode vi | |
$if mode=vi | |
set keymap vi-insert | |
# these are for vi-insert mode | |
Control-l: clear-screen | |
$endif |
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
sed 's/[a-z]/\u&/g' |
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/env bash | |
# Concatenate multiple audio and video files | |
# that are in the same directory into one .mkv file | |
ls | | |
xargs -I @ echo "file '@'" >> input.txt && | |
ffmpeg -f concat -i input.txt -c copy output.mkv && | |
rm input.txt |
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/env bash | |
# Trim all whitespaces for filenames in the current directory | |
for f in *; do mv "$f" `echo $f | tr ' ' '_'`; 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
#!/bin/env bash | |
# List all i3wm keybindings | |
# Dependecy: glow | |
i3config=~/.config/i3/config | |
awk \ | |
'BEGIN {\ | |
printf "\ |
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
! Remap numpads to actual number symbols | |
keycode 90 = 0 | |
keycode 87 = 1 | |
keycode 88 = 2 | |
keycode 89 = 3 | |
keycode 83 = 4 | |
keycode 84 = 5 | |
keycode 85 = 6 | |
keycode 79 = 7 | |
keycode 80 = 8 |
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/env bash | |
# Dependency: nodejs | |
input=$(cat /dev/stdin) | |
echo "console.log('$input'.replace('$1', '$2'))" | node |
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/env bash | |
############################## | |
# Date Difference Calculator # | |
# Dependency: nodejs # | |
############################## | |
echo "console.log(Math.round((new Date('$2').getTime() - new Date('$1')) / 86400000), 'days')" | node |