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
| #!/bin/sh | |
| # This script aims to address the problem of input lag that can occur when using the Chinese input method on macOS. | |
| # It provides a simple and effective solution by terminating the SCIM process, which is often the cause of the lag. | |
| # To use the script, follow these steps: | |
| # 1. Open the Terminal application (located in "Applications/Utilities/Terminal"). | |
| # 2. Copy and paste the script into the Terminal window. | |
| # 3. Press Enter to execute the script. |
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 python3 | |
| import os | |
| import paramiko | |
| ssh_key_filename = os.getenv('HOME') + '/.ssh/id_rsa' | |
| jumpbox_public_addr = '168.128.52.199' | |
| jumpbox_private_addr = '10.0.5.10' | |
| target_addr = '10.0.5.20' |
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
| {0: 'tench, Tinca tinca', | |
| 1: 'goldfish, Carassius auratus', | |
| 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
| 3: 'tiger shark, Galeocerdo cuvieri', | |
| 4: 'hammerhead, hammerhead shark', | |
| 5: 'electric ray, crampfish, numbfish, torpedo', | |
| 6: 'stingray', | |
| 7: 'cock', | |
| 8: 'hen', | |
| 9: 'ostrich, Struthio camelus', |
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
| # This is a simple wrapper for the "emcc" command from the emscripten compiler. | |
| # Unlike the emscripten SDK script, it lets you specify the compiler version | |
| # number. Just pass the version number using the "--version" flag and put the | |
| # flags for "emcc" after the "--": | |
| # | |
| # python emcc_wrapper.py --version 1.27.0 -- -O3 -s NO_EXIT_RUNTIME=1 ... | |
| # | |
| import os | |
| import sys | |
| import pipes |
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
| # 一些闲置的 VPS 装了 COW,给我亲爱的小伙伴们科学上网,不定期更新。 | |
| # 偏爱 CLI 的可以安装 @cyfdecyf 的 COW: https://github.com/cyfdecyf/cow | |
| # 喜欢用 GUI 的 Mac 用户可以用 @ohdarling 的 GoAgentX: https://github.com/ohdarling/GoAgentX | |
| # 这是客户端配置文件。 | |
| # 如果用 COW,可以直接覆盖 ~/.cow/rc | |
| # 系统 PAC 设置成: http://127.0.0.1:8833/pac | |
| # 如果用 GoAgentX,加一个 COW Service,本地端口用 8833,在高级设置里把这个配置粘贴进去就可以了。 | |
| # 欢迎在 Twitter 上关注我 https://twitter.com/lexrus |
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
| """ | |
| Utility (Linux only) to ensure subprocesses exit when their parents do by sending | |
| a specified signal when the parent dies. | |
| Usage: | |
| subprocess.Popen(['some-executable'], preexec_fn=on_parent_exit('SIGHUP')) | |
| """ | |
| import signal |