命令 | 说明 + 示例 | |
---|---|---|
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
OK, but we went through this whole fire-drill some time ago to describe the difference in the syntax (which we document and give examples of) because sometimes the where clause is wrapped in {where: ... } and sometimes not. | |
The docs say: | |
For query methods such as find(), findOrCreate(), or findOne(), use {where: {property: value}} | |
and | |
... for methods that update and delete (and count()), don't wrap the where clause in a { where : ... }, ... so use {property: value} | |
I just tested that myself and it seems to be accurate. |
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
https://press.one/p/address/v?s=c2e3c687c90835e3ef1f55c9ed0929a75812f60e9803f90f1a431c100b31f9682285e40c90531d69132bb062077ac4fc9043bb9828990a03776fcff69aefb9bd1&h=1aeddc4a3531c3414a17ce0ced9c56cee6ab50d40c16ea509e5fd6c325d58000&a=7e4c00d9b537ff016aa99b0a8e6233da817fbc4c&f=P1&v=2 |
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 not used unless SQLALCHEMY_BINDS is not present | |
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
SQLALCHEMY_BINDS = { | |
'master': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8', | |
'slave': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
} |
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
function tmc() { | |
before=$(df -hl / |awk '{print $3}' |tail -n1) | |
count=0 | |
for snapshot in $(tmutil listlocalsnapshots /|awk -F. '{print $4}');do | |
let 'count++' | |
echo "delete snapshot $snapshot" | |
tmutil deletelocalsnapshots $snapshot; | |
done | |
after=$(df -hl / |awk '{print $3}' |tail -n1) | |
if [[ $count -ne 0 ]]; then |