命令 | 说明 + 示例 | |
---|---|---|
ds | 删除括号 | |
例 | ds " |
"Hello world!" =>Hello world! |
cs | 替换括号 | |
例 | cs "( |
"Hello world!" =>(Hello world!) |
cS | 替换括号,括号内文本做新一行 | |
例 | cS "{ |
"Hello world!" => { Hello world! } |
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |
main() { | |
# Use colors, but only if connected to a terminal, and that terminal | |
# supports them. | |
if which tput >/dev/null 2>&1; then | |
ncolors=$(tput colors) | |
fi | |
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
YELLOW="$(tput setaf 3)" |
Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.
Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.
There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.
One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:
- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
Host example.org | |
IdentityFile ~/.ssh/id_rsa | |
Host * | |
ForwardAgent no | |
IdentitiesOnly yes |
The plan is to create a pair of executables (ngrok
and ngrokd
) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok
to connect to this ngrokd
, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com
, you'll need a record for that and for *.domain.com
.
from datetime import date | |
from sqlalchemy import cast, DATE | |
Match.query.filter(cast(Match.date_time_field, DATE)==date.today()).all() |