Logo
常用代码块合集
大纲

kotlin

添加全局logger

kotlin
val <T : Any> T.LOGGER: Logger
    get() = LoggerFactory.getLogger(this::class.java)

linux

打印文件树

shell
find . -maxdepth 2 | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

windows

上传公钥到服务器

cmd
type %USERPROFILE%\.ssh\id_rsa.pub | ssh user@host "cat >> ~/.ssh/authorized_keys"