| 命令 | 说明 + 示例 | |
|---|---|---|
| ds | 删除括号 | |
| 例 | ds " |
"Hello world!" =>Hello world! |
| cs | 替换括号 | |
| 例 | cs "( |
"Hello world!" =>(Hello world!) |
| cS | 替换括号,括号内文本做新一行 | |
| 例 | cS "{ |
"Hello world!" => { Hello world! } |
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
| some hammerspoon plugins to make your macOS smarter |
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 langchain_openai import ChatOpenAI | |
| from langchain_core.prompts import ChatPromptTemplate | |
| from langchain_core.pydantic_v1 import BaseModel, Field | |
| import json,urllib.request,websockets,asyncio | |
| from typing import TypedDict, List | |
| import textwrap,html | |
| from bs4 import BeautifulSoup, Tag, NavigableString,Comment | |
| import os | |
| from dotenv import load_dotenv,find_dotenv | |
| load_dotenv(find_dotenv()) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| alias jps ='jps -lvm' | |
| alias jpsk9='jps | fzf --reverse -m -e -i | cut -d " " -f1 | xargs kill -9 2>/dev/null' | |
| alias jpsk ='jps | fzf --reverse -m -e -i | cut -d " " -f1 | xargs kill 2>/dev/null' |
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/python3 | |
| import asyncio | |
| import time | |
| import socket | |
| import argparse | |
| import aiohttp | |
| class MyConnector(aiohttp.TCPConnector): |
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
| local function Chinese() | |
| -- 简体拼音 | |
| hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC") | |
| end | |
| local function English() | |
| -- ABC | |
| hs.keycodes.currentSourceID("com.apple.keylayout.ABC") | |
| end |
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 | |
| /*** | |
| Based off code from: | |
| https://www.experts-exchange.com/questions/26619790/Connect-to-Mysql-through-PHP-ssh2-tunnel.html | |
| Example usage: User/Pass Based Auth MySQL Proxy | |
| ----------------------------------------------- | |
| $user_pass_config = array( | |
| 'user' => 'username', | |
| 'pass' => 'password', |
In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So ⌘ + D does not mean hold shift. ⌘ + Shift + D does of course.
| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
NewerOlder