Skip to content

Instantly share code, notes, and snippets.

@sirlaurie
sirlaurie / rarbg-for-douban.js
Last active May 7, 2024 12:49
在豆瓣电影页面上给IMDb号添加rarbg搜索链接. 一键直达搜索结果页
// ==UserScript==
// @name 豆瓣电影RARBG搜索
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 在豆瓣电影页面添加RARBG搜索链接
// @author You
// @match https://movie.douban.com/subject/*
// @grant none
// ==/UserScript==
@sirlaurie
sirlaurie / build-ffmpeg-and-mpv.sh
Last active March 4, 2024 16:11
a script for building ffmpeg and mpv with capable playing dolby vision
#!/usr/bin/env zsh
# just for macOS
#
# The default options for installing ffmpeg and mpv via brew do not include the activation of libplacebo.
# As a result, when playing videos in Dolby Vision, the color mapping is not accurate. To resolve this issue,
# a script is used to compile ffmpeg with libplacebo activated, followed by the building of mpv.
# Extra: build mpv bundle, with jxl
if [ "$(uname -s)" != "Darwin" ]; then
@sirlaurie
sirlaurie / uninstall.sh
Last active November 10, 2022 05:03
clean macOS app. require fd command tools
#!/usr/bin/env zsh
RED='\033[0;31m'
GREEN='\033[0;32m'
WHITE='\033[1;37m'
NC='\033[0m'
if [[ $# != 1 ]]; then
echo "no input path. Usage:\n zsh $(basename $0) app_path"
exit
fi
#!/bin/zsh
test -d ~/ntfs || mkdir ~/ntfs
disk=$(diskutil list external | grep -i NTFS | awk '{print $7}')
echo "umounting /dev/$disk"
sudo umount /dev/$disk
echo "mounting by read and write NTFS privileges..."
sudo mount -t ntfs -o rw,auto,nobrowse /dev/$disk ~/ntfs