Skip to content

Instantly share code, notes, and snippets.

@markx
markx / CrossOver.sh
Last active June 10, 2025 07:11 — forked from santaklouse/CrossOver.sh
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@markx
markx / clash-config.yaml
Created December 4, 2024 14:09 — forked from xqm32/clash-config.yaml
clash config with proxy-providers and rule-providers
##### 使用说明 #####
# 1. 请填写 proxy-providers - subscribe - url 为订阅链接
# 2. 下载 https://github.com/Loyalsoldier/clash-rules/archive/refs/heads/release.zip 并解压至 ./profiles/ruleset 文件夹下
# 3. 若需要自动更新 ruleset, 请编辑 rule-providers-config - type 为 http
##### 参考链接 #####
# 1. clash 样例配置文件
# https://lancellc.gitbook.io/clash/clash-config-file/an-example-configuration-file
# 2. clash 规则集
# https://github.com/Loyalsoldier/clash-rules
@markx
markx / gist:6e7c38c56d0eb37188ab1ad831a73ee2
Created July 12, 2023 05:00
hammerspoon for tmux prefix
local apps = {"iTerm2", "Terminal"}
local hyper = {"cmd", "alt", "ctrl", "shift"}
local hotkey = hs.hotkey.new({'ctrl'}, 'tab', function() hs.eventtap.keyStroke({'ctrl'}, 'z') end)
local hotkeys = {
hs.hotkey.new({'ctrl'}, 'tab', function() hs.eventtap.keyStroke({'ctrl'}, 'z') end),
hs.hotkey.new(hyper, 'f', function() hs.eventtap.keyStroke({'ctrl'}, 'z') end),
hs.hotkey.new({'cmd'}, 's', function() hs.eventtap.keyStroke({'ctrl'}, 'z') end),
}
// ==UserScript==
// @name oledvod mpv
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.olevod.com/static/player/plyr3.html
// @match https://www.olevod.com/static/player/videojs.html
// @grant GM_webRequest
// @grant GM_openInTab
// ==UserScript==
// @name DoubanRating
// @namespace http://tampermonkey.net/
// @version 0.0.1
// @description 在欧乐上显示豆瓣分数.
// @author ke
// @match https://*.pangzitv.com/*
// @match https://*.olevod.com/*
// @match https://*.xiaobaotv.net/*
// @grant GM.xmlHttpRequest
@markx
markx / HttpProxy.go
Created March 6, 2022 02:44 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
(def TILES
{:floor {:type :floor
:blocking false
:opaque false
:glyph "."}
:wall {:type :wall
:blocking true
:opaque true
:glyph "#"}
:cljfmt {:remove-consecutive-blank-lines? false
:indents ^:replace {#"^[-*+!?_a-zA-Z]" [[:inner 0]]}}
// ==UserScript==
// @name WeiyunExporter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.weiyun.com/disk*
// @grant none
// ==/UserScript==
Content-Length: 58
{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}
Content-Length: 52
{"jsonrpc":"2.0","method":"exit","params":{},"id":1}