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 | |
# It modifies the Docker data folder to a new location. It is useful if you want to move the Docker data folder to a different drive or partition. | |
# Example usage: | |
# ./modify_docker_data_folder.sh /mnt/docker_data | |
red='\033[0;31m' | |
green='\033[0;32m' | |
yellow='\033[0;33m' | |
plain='\033[0m' |
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 | |
# Check the number of arguments | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 <path to watermark image> <search location> <dissolve percentage>" | |
exit 1 | |
fi | |
# Path to the watermark image | |
watermark_path="$1" |
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
document.querySelectorAll('[data-testid="add-button"]:not([aria-checked="true"])').forEach(button => button.click()); |
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
objectDeepReplace = (obj, searchRegex, replaceValue) => { | |
for (const key in obj) { | |
if (typeof obj[key] === 'string') { | |
obj[key] = obj[key].replace(searchRegex, replaceValue); | |
} else if (typeof obj[key] === 'object') { | |
objectDeepReplace(obj[key], searchRegex, replaceValue); | |
} | |
} | |
return obj; | |
}; |
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
# Iterate through the current folder and convert all JPG|JPEG|PNG|BMP format pictures to HEIC format, delete the original files after success | |
# 遍历当前文件夹,把所有JPG|JPEG|PNG|BMP格式图片转换为HEIC格式,成功后删除原文件 | |
find -E . -iregex ".*\.(jpg|jpeg|png|bmp)" -print | xargs -n1 -I {} sh -c 'echo "Converting \"{}\" to HEIC." && ((magick mogrify -quiet -format HEIC {} && rm {} && echo "success and deleted {}.") || echo "fail.")' |
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
window.onload = (function() { | |
var timer = setTimeout(Delete, 750); | |
var item = 0; | |
function Delete() { | |
if (item > 65) { | |
item = 0; | |
clearTimeout(timer); | |
return timer = setTimeout(Delete, 15000); | |
} |