This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| ICLOUD_DIR="$HOME/Library/Mobile Documents/com~apple~CloudDocs" | |
| DST_DIR="$ICLOUD_DIR/dotfiles/ghostty" | |
| SRC_DIR="$HOME/Library/Application Support/com.mitchellh.ghostty" | |
| echo "🔍 Checking iCloud Drive…" | |
| if [ ! -d "$ICLOUD_DIR" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ArrayHelpers | |
| { | |
| /** | |
| * 拉平数组 | |
| * @param $array | |
| * @param array $return | |
| * @param null $newKey | |
| * @param array $defaults 可能会没有值的字段 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name = "SSR" | |
| # author = "Jesson" | |
| # website = "https://www.huaqing.org/" | |
| [RULESET.SSR] | |
| name = "SSR" | |
| rules = [ | |
| "DOMAIN-SUFFIX,0rz.tw,PROXY", | |
| "DOMAIN-SUFFIX,0to255.com,PROXY", | |
| "DOMAIN-SUFFIX,12bet.com,PROXY", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name = "BlockAD" | |
| # author = "Jesson" | |
| # website = "https://www.huaqing.org/" | |
| [RULESET.BLOCKAD] | |
| name = "blockad Rules" | |
| rules = [ | |
| "DOMAIN-SUFFIX,00oo00.com,REJECT", | |
| "DOMAIN-SUFFIX,0563d.com,REJECT", | |
| "DOMAIN-SUFFIX,0311zs.net,REJECT", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tornado | |
| class RequestContextHandler(tornado.web.RequestHandler): | |
| def _execute(self, transforms, *args, **kwargs): | |
| # following the example of: | |
| # https://github.com/bdarnell/tornado_tracing/blob/master/tornado_tracing/recording.py | |
| global_data = {} # add whatever here, e.g. self.request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Pinyin { | |
| // | |
| protected $d = array( | |
| array("a",-20319), | |
| array("ai",-20317), | |
| array("an",-20304), | |
| array("ang",-20295), | |
| array("ao",-20292), | |
| array("ba",-20283), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Verify{ | |
| /** | |
| * 验证用户名 | |
| * @param string $value | |
| * @param int $length | |
| * @return boolean | |
| */ | |
| public static function isNames($value, $minLen=2, $maxLen=20, $charset='ALL'){ | |
| if(empty($value)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rq import Queue, Worker, Connection | |
| if __name__ == '__main__': | |
| with Connection(): | |
| q = Queue() | |
| Worker(q).work() |