Skip to content

Instantly share code, notes, and snippets.

View alanhg's full-sized avatar
⌨️
Focusing

Alan.He alanhg

⌨️
Focusing
View GitHub Profile
@alanhg
alanhg / 📊 Weekly development breakdown
Last active May 5, 2024 00:03
📊 Weekly development breakdown
YAML 27 mins ██████████████▍░░░░░░ 68.8%
Markdown 8 mins ████▊░░░░░░░░░░░░░░░░ 22.8%
JSON 1 min █░░░░░░░░░░░░░░░░░░░░ 4.9%
HTML 0 secs ▌░░░░░░░░░░░░░░░░░░░░ 2.4%
JavaScript 0 secs ▏░░░░░░░░░░░░░░░░░░░░ 1.1%
@alanhg
alanhg / pinduoduo.user.js
Created December 28, 2023 13:52
拼多多脚本,方便发送消息
// ==UserScript==
// @name 拼多多增强脚本
// @namespace http://tampermonkey.net/
// @version 2023-12-28
// @description try to take over the world!
// @author Alan He
// @match https://mobile.yangkeduo.com/chat_detail.html*
// @icon https://www.google.com/s2/favicons?sz=64&domain=pinduoduo.com
// @grant none
// @run-at document-end
@alanhg
alanhg / jd_review.user.js
Last active December 25, 2023 04:23
京东自动评价 for Tampermonkey
// ==UserScript==
// @name JD Review
// @namespace http://tampermonkey.net/
// @version 2023-12-23
// @description try to take over the world!
// @author Alan He
// @match https://club.jd.com/myJdcomments/myJdcomment.action
// @grant none
// @run-at context-menu
// ==/UserScript==
@alanhg
alanhg / text-select.user.js
Created December 24, 2023 07:09
文本选中支持
// ==UserScript==
// @name 文本选中支持
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://m.163.com/*/article/*
// @match https://www.baidu.com/bh/dict/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=163.com
// @grant none
@alanhg
alanhg / video-speed.user.js
Created December 24, 2023 05:11
视频变速 for Tampermonkey
// ==UserScript==
// @name 视频变速
// @namespace http://tampermonkey.net/
// @version 2023-12-23
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/watch*
// @match https://peixun.amac.org.cn/**
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @run-at document-start
@alanhg
alanhg / ecitic-user.js
Created December 24, 2023 05:08
中信银行贷款信息统计
// ==UserScript==
// @name 中信还款
// @namespace http://tampermonkey.net/
// @version 0.5
// @description try to take over the world!
// @author You
// @match https://i.bank.ecitic.com/perbank6/gotomain.do
// @icon https://www.google.com/s2/favicons?sz=64&domain=ecitic.com
// @grant none
// ==/UserScript==
@alanhg
alanhg / wifi-changed.js
Created February 6, 2021 03:55
surge wifi changed ,auto change proxy
/**
* @description
* 如果是家里WI-FI则开启直连模式
* 如果不是家里WI-FI则开启代理模式
*/
const WIFI_DONT_NEED_PROXYS = ['xiaomi_Alan_5G'];
if (WIFI_DONT_NEED_PROXYS.includes($network.wifi.ssid)) {
$surge.setOutboundMode('direct');
$notification.post('Surge', 'Wi-Fi changed', 'use direct mode');
@alanhg
alanhg / alpine.Dockerfile
Last active September 6, 2023 04:24
alpine.Dockerfile
FROM alpine:3.14
RUN apk add --no-cache mysql-client
ENTRYPOINT ["mysql"]
@alanhg
alanhg / Dockerfile
Created August 6, 2023 11:09
centos-lrzsz.dockerfile
1 # 维护者信息
2 # 使用官方 CentOS 镜像为基础
3 FROM centos:centos7
4
5
6 # 安装 nginx 和 lrzsz
7 RUN yum -y update && \
8 yum -y install epel-release && \
9 yum -y install nginx lrzsz && \
10 yum clean all
@alanhg
alanhg / sound.scpt
Last active February 18, 2023 23:22
switch input or output by applescript
set devices to {}
tell application "System Preferences"
reveal pane id "com.apple.preference.sound"
end tell
tell application "System Events"
tell application process "System Preferences"
tell tab group 1 of window "Sound"
click radio button "Output"
tell table 1 of scroll area 1