Skip to content

Instantly share code, notes, and snippets.

@dubiao
dubiao / ntfs.sh
Created April 15, 2026 09:33
Mount NTFS drives as writable on macOS
#!/bin/bash
if [ "$1" = "-d" ] ; then
dev=$2
volume=$3
diskutil info $dev|grep NTFS>/dev/null
if [ $? -ne 0 ] ; then
echo "The recently mounted disk: $dev is not an NTFS disk! Press Return to exit"
read
else
diskutil umount $volume>/dev/null
@dubiao
dubiao / ntfs.sh
Created April 15, 2026 09:20
将NTFS硬盘挂载为可写
#!/bin/bash
if [ "$1" = "-d" ] ; then
dev=$2
volume=$3
diskutil info $dev|grep NTFS>/dev/null
if [ $? -ne 0 ] ; then
echo "最近挂载的磁盘:$dev 不是 NTFS 磁盘! 按 Return 键退出"
read
else
diskutil umount $volume>/dev/null
@dubiao
dubiao / override.yml
Last active April 17, 2026 15:17
复写脚本
rule-providers:
private:
url: https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/private.yaml
path: ./ruleset/private.yaml
behavior: domain
interval: 86400
format: yaml
type: http
cn_domain:
url: https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/cn.yaml
@dubiao
dubiao / get_free_models_on_openrouter.js
Last active April 13, 2026 05:59
List all free models on openrouter.ai
const https = require('https');
const options = {
hostname: 'openrouter.ai',
path: '/api/frontend/models/find?max_price=0&order=pricing-low-to-high&fmt=cards&output_modalities=text',
method: 'GET',
headers: {
'accept': '*/*',
'accept-language': 'zh-CN,zh-HK;q=0.9,zh-TW;q=0.8,zh;q=0.7,en;q=0.6',
'cache-control': 'no-cache',
@dubiao
dubiao / get_renew_macbook.js
Created March 11, 2026 09:41
获取苹果官翻机价格 Get Refurbished Macbook Prices
const https = require('https');
const url = 'https://www.apple.com.cn/shop/refurbished/mac/macbook-air-macbook-pro';
/**
* 字符平衡计数法提取对象字符串
*/
function extractObject(html, marker) {
const startIndex = html.indexOf(marker);
if (startIndex === -1) return null;
@dubiao
dubiao / get_renew_macbook.js
Created March 11, 2026 09:40
获取苹果官翻机价格 Get Refurbished Macbook Prices
const https = require('https');
const url = 'https://www.apple.com.cn/shop/refurbished/mac/macbook-air-macbook-pro';
/**
* 字符平衡计数法提取对象字符串
*/
function extractObject(html, marker) {
const startIndex = html.indexOf(marker);
if (startIndex === -1) return null;
@dubiao
dubiao / my_clash_config.yaml
Last active April 29, 2025 09:14
自用的 clash 配置。把 25 行那里换成 自己的订阅地址。
mixed-port: 7890
#---------------------------------------------------#
## 配置文件需要放置在 $HOME/.config/clash/*.yaml
allow-lan: false
mode: Rule
log-level: info
external-controller: '127.0.0.1:9090'
dns:
enable: true
@dubiao
dubiao / SOGO-Syncevolution-Syncscript.sh
Created October 16, 2019 05:18 — forked from bastos77/SOGO-Syncevolution-Syncscript.sh
ubuntu touch SOGo-syncevolution syncronisation script
#!/bin/bash
# This script is a draft combination of the script found at https://gist.github.com/tcarrondo
# It is what I have done to make it work for my Fairphone 2 with UBports ubuntu touch 16.04
# Combined by me: Sebastian Gallehr <sebastian@gallehr.de>
# Thanks to: Tiago Carrondo <tcarrondo@ubuntu.com>
# Thanks to: Romain Fluttaz <romain@botux.fr>
# Thanks to: Wayne Ward <info@wayneward.co.uk>
# Thanks to: Mitchell Reese <mitchell@curiouslegends.com.au>
# --------------- [ Server ] ---------------- #
CAL_URL="https://..." # add the caldav URL here
@dubiao
dubiao / quick-rn-guide
Last active May 14, 2019 11:32
List the files that quick-in-rn/podspec repo cares about
#File Tree
.
├── package.json
├── DoubleConversion.podspec
├── Folly.podspec
├── glog.podspec
├── yoga.podspec
├── scripts
│ ├── ios-configure-glog.sh
│ └── ios-install-third-party.sh