Skip to content

Instantly share code, notes, and snippets.

View qiujianzhong's full-sized avatar
🎯
Focusing

qiujianzhong qiujianzhong

🎯
Focusing
  • Shanghai
View GitHub Profile
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
@qiujianzhong
qiujianzhong / avvod.sh
Last active June 5, 2018 07:37
avvod test script
#!/bin/bash
#make by xiaoqiu
#2018-04-09
#持续完善中
#第一次使用,需要安装依赖
#brew install coreutils
#brew install mpv --with-bundle
@qiujianzhong
qiujianzhong / server.go
Last active February 27, 2018 08:59
qiniu ufop-demo
package main
import (
"bufio"
"fmt"
"log"
"net/http"
"os"
"strconv"
"strings"
@qiujianzhong
qiujianzhong / global-protect.sh
Last active October 20, 2017 02:00 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/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)
@qiujianzhong
qiujianzhong / build-python-2.7.9.sh
Created March 2, 2017 15:05
upgrade Python 2.7.6 -> 2.7.9 on Ubuntu 14.04
#!/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 \
#开启
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