This file contains 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
#开启 | |
git config --global http.proxy 'socks5://127.0.0.1:1080' | |
git config --global https.proxy 'socks5://127.0.0.1:1080' | |
#关闭 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy |
This file contains 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/sh | |
# | |
# Installs Python 2.7.9 on Ubuntu 14.04 to include security updates | |
# Run this script with superuser privileges. | |
# | |
BASEDEPS="build-essential python-pip" | |
BUILDDEPS="libbz2-dev \ | |
libc6-dev \ | |
libgdbm-dev \ |
This file contains 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 | |
#sudo vim /usr/local/sbin/vpn | |
#sudo chmod +x /usr/local/sbin/vpn | |
#Usage vpn | |
num=`ps -ef|grep GlobalProtect|grep -v grep|wc -l|awk -F ' ' '{print $1}'` | |
case $# in | |
0) |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
"strings" |
This file contains 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 | |
#make by xiaoqiu | |
#2018-04-09 | |
#持续完善中 | |
#第一次使用,需要安装依赖 | |
#brew install coreutils | |
#brew install mpv --with-bundle |
This file contains 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
rm -f /tmp/info_* | |
mystrings="" | |
mystrings="${mystrings}$(hostname)," | |
mystrings="${mystrings}$(hostname -I)," | |
mystrings="${mystrings}$(cat /etc/issue|grep Ubuntu |awk -F 'LTS' '{print $1}')," | |
mystrings="${mystrings}$(uname -r)," | |
mystrings="${mystrings}$(cat /proc/cpuinfo |grep name |uniq -c |awk -F 'model name\t' '{print $2$1}'|tr -d '\t:' |sed "s/ /*/g")," | |
mystrings="${mystrings}$(free -g|grep Mem |awk -F ' ' '{print $2}')," | |
mystrings="${mystrings}$(df -hT|grep ^/dev |awk -F ' ' '{print $3}' |xargs)" | |
echo $mystrings > /tmp/info_$(hostname).txt |