This file contains hidden or 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 | |
# Color Alias | |
NO_COLOR='\033[0m' | |
RED_BG='\033[7;49;31m' | |
RED='\033[1;49;31m' | |
GREEN_BG='\033[7;49;32m' | |
GREEN='\033[1;49;32m' | |
ORANGE_BG='\033[7;49;33m' | |
ORANGE='\033[1;49;33m' |
This file contains hidden or 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 | |
mkdir out | |
# if flac exists, split flac. | |
if [ -f CDImage.flac ]; then | |
echo "FLAC found." | |
shnsplit -f CDImage.cue -t "%n. %t" -d out -o flac CDImage.flac | |
# else if wav exists, split wav. | |
elif [ -f CDImage.wav ]; then |
This file contains hidden or 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 | |
# Usage: | |
# cat <file> | sh rename-tracks.sh | |
# Each line in <file> should be "<trackNo>.<trackName>" | |
# There must be an empty line at the end of file. | |
# Detect file extension. | |
if [ $(ls -1 *.mp3 2>/dev/null | wc -l) != 0 ]; then | |
fileExt="mp3" |
This file contains hidden or 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 | |
# Parameters | |
# ==================================================================================== | |
# Color Alias | |
NO_COLOR='\033[0m' | |
RED_BG='\033[7;49;31m' | |
RED='\033[1;49;31m' | |
GREEN_BG='\033[7;49;32m' |
This file contains hidden or 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 | |
for file in *.wav; | |
do name=$(echo $file | sed "s/\\.wav//g"); | |
ffmpeg -acodec dts -i "$name".wav -vn -sn -acodec flac "$name".flac; | |
done |
This file contains hidden or 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 | |
for i in $(seq 1 5); | |
do | |
echo "Scan host${i}" | |
echo "- - -" > /sys/class/scsi_host/host${i}/scan | |
done |
This file contains hidden or 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 | |
lsblk | |
echo -e "Proceed to stop sda, sdc, sdd ? (y/n)" | |
read -p "> " answer | |
if [ $answer = "y" ]; then | |
echo 1 > /sys/block/sda/device/delete | |
echo 1 > /sys/block/sdc/device/delete | |
echo 1 > /sys/block/sdd/device/delete |
This file contains hidden or 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
/** | |
* Upgrade dependencies to the latest with pnpm. | |
*/ | |
const { spawn } = require('child_process') | |
const manifest = require('../package.json') | |
const devDeps = Object.keys(manifest.devDependencies | |
? manifest.devDependencies : []) |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"globals": { | |
"Atomics": "readonly", |
This file contains hidden or 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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
pnpm-debug.log* | |
lerna-debug.log* | |
# Node.js |