Skip to content

Instantly share code, notes, and snippets.

View eleztian's full-sized avatar
😀

Ztian Ele eleztian

😀
View GitHub Profile
@eleztian
eleztian / postman.js
Created November 24, 2019 02:38
post 自动获取token
const echoPostRequest = {
url: pm.environment.get("URL") +'/api/auth/rest_login',
method: 'POST',
body: {
mode: 'raw',
raw: JSON.stringify({ name: 'admin', password:'xxxxx' })
}
};
pm.sendRequest(echoPostRequest, function (err, res){
@eleztian
eleztian / resolve.sh
Created November 24, 2019 02:37
自动下载目标软件所需的所有依赖到当前文件夹
#!/bin/bash
# 自动下载目标软件所需的所有依赖到当前文件夹
yumdownloader $1
while true; do
c1=`ls -l | wc -l`
for rpm in `ls`; do
echo $rpm | awk -F '-' '{printf("%s-%s\n",$1, $2)}' | xargs -I {} yumdownloader --resolve {};