Skip to content

Instantly share code, notes, and snippets.

View sarkrui's full-sized avatar
🚀
Kicking off

Sark sarkrui

🚀
Kicking off
View GitHub Profile
@sarkrui
sarkrui / com.rclone.plist
Created March 1, 2020 11:34
Auto mount Rclone on macOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>rclone</string>
<key>ProgramArguments</key>
<array>
@sarkrui
sarkrui / removeMacOSUpdateAlert.sh
Last active August 4, 2020 14:17
Snippets to remove macOS updates alert
#! /bin/bash
sudo softwareupdate --ignore "macOS Catalina"
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0
killall Dock
echo "Done!"
@sarkrui
sarkrui / WeChat_backup.sh
Last active February 23, 2023 09:48
备份微信聊天记录
#!/bin/bash
#change working directory to Desktop
cd ~/Desktop
# remove any previously existing compressed files
rm -f WeChat_history*
# generate the new updated
tar -vczf ~/Desktop/WeChat_history$(date +%F_%R).tgz ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat
@sarkrui
sarkrui / weibo_emoji_urls.txt
Last active March 21, 2022 14:03
Weibo Emoji Urls
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/2020liuyi_zhifeiji_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f4/2020liuyi_bangbangtang_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/02/hot_wuhanjiayou_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/2018new_zhongguozan_org.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/42/2018new_baobao_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_tanshou_org.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/75/2018new_gui_org.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/hot_wosuanle_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/23/dianying_huamulan_thumb.png
https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/chuangzaoying_shoushi_thumb.png
@sarkrui
sarkrui / crontab
Created July 12, 2020 17:29
list oracle object storage bucket via oci-cli
PATH=/users/<YOUR_USER_NAME>/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
*/10 * * * * cd ~/.scripts && ./oracle.sh > ~/.scripts/log/oracle.log 2>&1
@sarkrui
sarkrui / .zshrc
Last active April 15, 2021 03:46
My exclusive zsh alias
#Aliases
#Alias for uPic application
alias upic='/Applications/uPic.app/Contents/MacOS/uPic'
#Check if gif_temp existence and upload if true, and copy generated url link to clipboard
alias ugif='
file=~/Desktop/gif_temp.gif;
if [ -e "$file" ]; then
echo "File exists";
@sarkrui
sarkrui / customPlayback.js
Last active November 21, 2020 13:25
Netflix Custom Playback Rate
# Netflix 倍速 JavaScript 命令
# 已在 Safari/Chrome/Edge 浏览器下测试有效
# 使用方法:调用开发者工具 - 控制台
# Netflix Custom Playback Rate Javascript Command
# Usage: you shall enter the command at the developer tool - console
# The command has been tested vaild on Safari/Chrome/Edge browsers.
# 示例/Examle: document.querySelector ('video').playbackRate = 1.6, 1.6 could be any float value
@sarkrui
sarkrui / installScript_1016beta_aria2c.sh
Last active September 25, 2020 12:47
Script to Install macOS 1016
#!/bin/sh
printf '\033[8;60;172t'
clear
LocalScriptVer="v1.0.5"
RemoteScriptVer=""
RemoteScriptPath="https://raw.githubusercontent.com/crazybirdy/MBR-Manual-Method/master/Q6-DownloadFullApp"
LocateScriptPath="$HOME/Desktop/"
ScriptName="installScript_110fullapp"
@sarkrui
sarkrui / addSRT.sh
Last active August 30, 2020 20:29
微信表情包制作相关
#!/bin/bash
cd "$(dirname "$0")"
echo "拖拽文件"
read filepath
fullname=$(basename $filepath)
filename=${fullname%.*}
nullpath=${filepath%.*}
@sarkrui
sarkrui / segytb.sh
Last active September 12, 2020 22:32
Download YouTube videos with optional arguments for trimming
#!/bin/bash
dirpath="/path/to/directory"
cd "$dirpath"
url=$1
startTimestamps=$2
endTimestamps=$3
scriptname="segytb"