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
| # On Linux PC | |
| # socat pty,link=/tmp/ttyV0,raw tcp:192.168.X.X:2000 | |
| # picocom /tmp/ttyV0 | |
| # esptool.py --before no_reset --after no_reset --port /tmp/ttyV0 | |
| # rshell -p /tmp/ttyV0 --buffer-size 5000 | |
| showTCP=False | |
| showUART=False | |
| try: |
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
| <root> | |
| <skin> | |
| <text_color>16777215,10022341,16777215,16777215,16777215,16770992,16770992,16770992,16770992</text_color> | |
| <specify_each_item_color>0</specify_each_item_color> | |
| <skin_author>m</skin_author> | |
| <font name="Microsoft YaHei" size="8" style="0"/> | |
| <display_text> | |
| <up>上传 </up> | |
| <down>下载 </down> | |
| <cpu>CPU </cpu> |
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/bash | |
| xargs -0 -L1 -a "$@" |
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/bash | |
| echo -n -e "NOW: $(date)\n" | |
| echo | |
| git branch |more | |
| echo | |
| git status -suno | |
| echo | |
| case $1 in | |
| "log") |
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/bash | |
| TDIR=$(mktemp -d /dev/shm/imapread-XXXXX) | |
| cd "$TDIR" | |
| touch alias mutt_certificates mutthistory postponed sent signature | |
| mkdir Mail mbox spool tmp | |
| account="$1" | |
| declare -A server_addrs |
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/bash | |
| # 获取当前用户ID | |
| CURRENT_USER_ID=$(id -u) | |
| echo "CURRENT_USER_ID=$CURRENT_USER_ID" | |
| # 遍历/proc,找到属于当前用户,且 exec 指向 /usr/bin/plasmashell 的进程 | |
| for dir in /proc/*; do | |
| # echo "checking dir = $dir" | |
| if [ -d $dir ] && [[ $dir =~ /proc/[0-9]* ]]; then |
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/bash | |
| urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } | |
| urldecode $1 |
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/bash | |
| echo "nohup execute : $*" | |
| setsid -f nohup $* >/dev/null 2>&1 & | |
| sleep 1 | |
| disown -a | |
| sleep 1 | |
| exit |
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/bash | |
| PARAS="$@" | |
| TEXT="是否复制以下内容?" | |
| if [[ "$PARAS" ]] ; then | |
| TEXT="$TEXT\n$PARAS" | |
| fi | |
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 | |
| # usage: | |
| # env mail_acc="[email protected]" env mail_pswd="xxx" env mail_title="Hi~" env mail_content="Hello~" smtp2self | |
| import sys | |
| import os | |
| import logging | |
| logging.basicConfig(level=logging.DEBUG) |