yum install centos-release-scl
yum install devtoolset-8-gcc*
scl enable devtoolset-8 bash
source /opt/rh/devtoolset-8/enable
- ps -eaf | grep process_name # get pid
- gcore $pid
- you got a $pid.core file.
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 | |
# | |
# Find all processes that are executing a futex(2) call with op=FUTEX_WAIT | |
# In some cases this can be helpful in finding deadlock-ed processes. | |
# | |
test ! $UID -eq 0 && echo -e "WARNING: Not running as root, only processes for this user are being scanned\n" >&2; | |
pids=$(ps -u $UID -opid --no-headers) | |
for pid in $pids; do |
echo "your name" | sort -u | while read name; do echo -en "$name\t"; git log --after="start_date" --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2; files[$3] } END { printf "added lines: %s, removed lines: %s, total lines: %s, total files: %s\n", add, subs, loc, length(files) }' -; done
git config --global credential.helper store
- type these 2 cmds in terminal windows.
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct
- reopen vscode, create a go project, then vscode auto pop up requesting for go extension installing.
- select
install all
wget https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tgz tar zxvf Python-3.9.5.tgz
若未安装dnf,安装dnf命令如下: 前置依赖: yum install epel-release 或者 yum install epel-release -y 安装dnf: yum install dnf
class myClassMethod():
def __init__(self,func):
self._func = func
def __get__(self, obj, obj_type = None):
def wrapper(*args,**kargs):
return self._func(obj_type, *args, **kargs)
return wrapper
# define our own classmethod decorator
class myClassMethod():
# init a Decorator obj, see the Decorator protocol here: https://docs.python.org/3/glossary.html#term-descriptor
def __init__(self,func):
self._func = func
# Decorator obj as an attibute, this method handlers the getattr call.
def __get__(self, obj, obj_type = None):
# warp the original function
nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /dev/null 2>&1 &
# copy as many lines as instances you want to open.
nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /dev/null 2>&1 &
NewerOlder