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
const PARENT_LABEL = 'example.com' | |
const LABEL_SEPARATOR = '-' | |
const LEVEL_SEPARATOR = '.' | |
const getLabelOrCreate = (labelName) => GmailApp.getUserLabelByName(labelName) || GmailApp.createLabel(labelName) | |
function labelMailsByAddress() { | |
const allTargetThreads = GmailApp.search(`label:${PARENT_LABEL} `) | |
allTargetThreads.forEach(thread => { |
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
while read -r ip_range do | |
ufw deny from $ip_range | |
done < ip_ranges.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
for svg in $(ls ./svg); do | |
filename=$(echo $svg | cut -d'.' -f1) | |
convert -background none -density 1000 -resize 1000x svg/$(echo $filename).svg png/$(echo $filename).png | |
echo [DONE] $filename converted! | |
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
const UID = args.widgetParameter | |
if (!/^\d+$/.test(UID)) throw new Error('请提供正确的 UID') | |
let widget = createWidget(await getData(UID)) | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} |
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
# assume that all videos in the directory are of the same codec | |
# first choose one of the videos to see the codec of audio | |
ffprobe xxx.mp4 | |
# batch convert (in this example: mp4 -> aac) | |
for i in *.mp4; do ffmpeg -i "$i" -vn -acodec copy "${i%.*}.aac"; 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
123456 | |
21eternal | |
3322964 | |
ABCDEF | |
Allen | |
AmiKara | |
Baboo | |
Card | |
Dashy | |
Delbert |
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
// Solution from: | |
// https://users.rust-lang.org/t/30856/5 | |
use std::collections::{HashMap, hash_map::Entry}; | |
use std::cmp::Eq; | |
use std::hash::Hash; | |
use std::thread::sleep; | |
use std::time::Duration; | |
struct Cacher<T, U, V> | |
where T: Fn(&U) -> V, U: Eq + Hash { |
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
const UID = 00000000 // 改为你的用户 ID | |
const COOKIE = "" // (可选,推荐设置)改为你的 cookie | |
let { title, user, image, videoUrl } = await getVideo(UID, COOKIE) | |
let widget = createWidget(title, user, videoUrl, image) | |
if (!config.runsInWidget) { | |
await widget.presentMedium() | |
} |
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
123mxs | |
AlalajiYH | |
TryRSS | |
Yun | |
a2121441645 | |
cbbcww | |
linglingqi | |
nobody | |
quarry | |
oui |
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
ultravlc |
NewerOlder