Skip to content

Instantly share code, notes, and snippets.

View iqiancheng's full-sized avatar
🌴
On vacation

千橙 iqiancheng

🌴
On vacation
View GitHub Profile
@iqiancheng
iqiancheng / add_stash_proxy_config.txt
Created April 14, 2024 10:35
add_stash_proxy_config for Stash
- DOMAIN-SUFFIX,0rz.tw,YouTube
- DOMAIN-SUFFIX,1drv.com,YouTube
- DOMAIN-SUFFIX,1drv.ms,YouTube
- DOMAIN-SUFFIX,4bluestones.biz,YouTube
- DOMAIN-SUFFIX,4shared.com,YouTube
- DOMAIN-SUFFIX,520cc.cc,YouTube
- DOMAIN-SUFFIX,5itv.tv,YouTube
- DOMAIN-SUFFIX,881903.com,YouTube
- DOMAIN-SUFFIX,9bis.net,YouTube
- DOMAIN-SUFFIX,9cache.com,YouTube
@iqiancheng
iqiancheng / china-top-website-whitelist.txt
Created April 14, 2024 10:35
Top Domains and china top website
##基于 https://github.com/n0wa11/gfw_whitelist/blob/master/whitelist.pac 整理
#cn域名
.cn
#custom-list
.zoopda.com
.yixun.com
.jd.com
.zdmimg.com
.appgame.com
.qiniucdn.com
// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.
@iqiancheng
iqiancheng / confluence-comment-navigator.user.js
Created April 10, 2024 03:27 — forked from ideadapt/confluence-comment-navigator.js
Confluence Inline Comment Navigator via prev & next Links
// ==UserScript==
// @name Confluence Inline Comment Navigator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Navigate through all open inline comments on a confluence page
// @author kunz@ideadapt.net
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @include *://*/*confluence/display/*
// @include *://*/*confluence/display/*
@iqiancheng
iqiancheng / main.py
Created April 9, 2024 02:54
arc-export bookmarks 导出所有收藏书签
import datetime
import json
import os
from pathlib import Path
def main() -> None:
data: dict = read_json()
html: str = convert_json_to_html(data)
write_html(html)
@iqiancheng
iqiancheng / Texify-Mathjax.user.js
Created March 1, 2024 02:42 — forked from arshsingh/Texify-Mathjax.js
A Tampermonkey / Greasemonkey script that turns LaTeX code on page into mathematical symbols using MathJax
// ==UserScript==
// @name TeXify the World MathJax
// @namespace
// @version 1.0
// @description Enables MathJax to process LaTeX on all websites. Based off SOUP (Stack Overflow Unofficial Patch) and http://www.math.ucla.edu/~robjohn/math/mathjax.html.
// @include *
// @copyright
// ==/UserScript==
/*
var mathjaxVersion = "http://cdn.mathjax.org";
@iqiancheng
iqiancheng / hdiutil.txt
Created February 26, 2024 07:34 — forked from NapoleonWils0n/hdiutil.txt
macosx: hdiutil creating disk images
hdiutil
Creating Internet-enabled Disk images
hdiutil internet-enable -yes /Path/to/image/myapp.dmg
burn an iso
@iqiancheng
iqiancheng / wsj.user.js
Created February 22, 2024 02:24 — forked from casbeebc/wsj.user.js
Wall Street Journal Paywall bypass
/* jshint esversion: 6 */
// ==UserScript==
// @name WSJ and Barrons Paywall Hack - No Popup Confirmation
// @description Paywall bypass for WSJ and Barrons without any confirmation popup
// @match https://www.wsj.com/*
// @match https://www.barrons.com/*
// @run-at document-end
// @grant none
// @version 1
// ==/UserScript==
@iqiancheng
iqiancheng / medium.user.js
Created February 19, 2024 07:42 — forked from mathix420/medium.user.js
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.1
// @inject-into content
@iqiancheng
iqiancheng / README.md
Last active January 30, 2024 12:25
一行式Check if MPS is Available

If you want to check MPS availability using a one-liner in the command line, you can use the following:

python3 -c "import torch; print(f\"MPS is {'' if torch.backends.mps.is_available() else 'not '}available\") "

This one-liner imports the torch module, checks if MPS is available, and prints the corresponding message.

python3 -c "import torch; print(torch.backends.mps.is_available())"