10 2022 档案
摘要:https://www.baeldung.com/linux/locale-environment-variables To determine the current character mapping locale charmap f RHEL: /etc/locale.conf localec
阅读全文
摘要:--is-inside-work import subprocess, os repo_dir = os.path.expanduser('~/git/dchelper') command = ['git', 'rev-parse', '--is-inside-work-tree'] process
阅读全文
摘要:Disable screen lock: Settings -> Privary -> Screen Lock -> Disable cursor blinking: Method 1: Turn on/off Blinking Cursor via GNOME Settings Settings
阅读全文
摘要:向处于CLOSE_WAIT的socket发送数据是OK的, 向CLOSED状态的socket发数据触发,BrokenPipeError, 此时fd没有被释放,client此socket没有close, 调用close后, lsof显示连接被释放, 在调用send时, 报OSError
阅读全文
摘要:history相关环境变量 HISTIGNORE export HISTIGNORE='pwd:ls:ls -l:exit' will not log command pwd ls, ls -a会记录, 即加参数会记录 HISTCONTROL export HISTCONTROL='ignoredu
阅读全文
摘要:__format__ 在format(object,format_spec:str), f-string, ''.format()生效 format_spec [[fill]align][sign][#][0][minimumwidth][.precision][type] class Superf
阅读全文
摘要:groupby: import typing, operator, itertools class GroupBy: def __init__(self, iterable: typing.Iterable, key=None): if key is None: key = lambda v: v
阅读全文
摘要:echo $(id -nu):amortize | chpasswd # current user echo parallels:amortize | chpasswd # specific user
阅读全文
摘要:Linux: source /etc/bash_completion.d/git souirce /usr/share/bash-completion/completions/git apt-get install git-core bash-completion source "$(pkg-con
阅读全文
摘要:wc -l will not count a final "line" if it doesn't end with a newline. Because a file (or stream) of zero lines can be distinguished from a file of one
阅读全文