sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 425956BB3E31DF51sudo add-apt-repository 'deb http://packages.deepin.com/deepin stable non-free'| // +build windows | |
| //go:generate go build -ldflags "-s -w -extldflags '-static'" $GOFILE | |
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unsafe" | |
| ) |
| #!/bin/bash | |
| # 参考: https://www.52pojie.cn/thread-659866-1-1.html | |
| cd `mktemp -d` | |
| mkdir -p tool app | |
| # 安装相关工具 | |
| cd tool | |
| wget --no-check-certificate -O openjdk.tar.gz https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz | |
| wget --no-check-certificate https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool |
| #!/bin/bash | |
| #AC娘表情包 01-54 | |
| #http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ac/01.gif?v=0.1 | |
| #匿名版表情包 01-40 | |
| #http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ais/01.gif?v=0.1 | |
| #AC新娘表情包 01-55 | |
| #http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ac2/01.gif?v=0.1 |
| #!/usr/bin/env bash | |
| cd `dirname $0` | |
| if [ "githook.sh" = "`basename $0`" ]; then | |
| gitroot=$(git rev-parse --show-toplevel) | |
| cp -f ${gitroot}/scripts/githook.sh ${gitroot}/.git/hooks/pre-commit | |
| chmod u+x ${gitroot}/.git/hooks/pre-commit | |
| exit 0 | |
| elif [ "pre-commit" = "`basename $0`" ]; then | |
| cd ../.. |
| #!/bin/bash | |
| if [ -n "${1}" ]; then | |
| WD=${1} | |
| else | |
| WD=$(cd `dirname $0`/..;pwd) | |
| fi | |
| # find all text file extensions which not in the dir: .idea/.git/vendor/thirdparty/sdk/swagger | |
| exts=$(find ${WD} -type f -not -path "*.idea*" -not -path "*.git*" -not -path "*/sdk/*" -not -path "*rd*arty*" -not -path "*vendor*" -not -path "*swagger*" -exec grep -Iq . {} \; -and -print 2> /dev/null | awk -F '.' '{if ($NF!~/\//){print $NF}}' | sort | uniq) |
| #!/usr/bin/env bash | |
| # Thread state | |
| # pidstat -dhut -p <PID> | |
| # top -bcH -n 1 -p <PID> | |
| # pstree -ps <PID> | |
| pname=${1} | |
| if [ -z "${pname}" ] || [[ "${pname}" =~ [-](h|H|[-]?help) ]]; then | |
| echo -e "Error: need input a process name or pid\n" |
| package sftp | |
| import ( | |
| "errors" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path/filepath" | |
| "strings" | |
| "time" |
| package main | |
| import ( | |
| "math/rand" | |
| "time" | |
| "fmt" | |
| ) | |
| const ( | |
| lowercaseLetter = `abcdefghijklmnopqrstuvwxyz` |