Skip to content

Instantly share code, notes, and snippets.

View 331527583's full-sized avatar

iratel 331527583

View GitHub Profile
@331527583
331527583 / rfc793
Created November 16, 2017 06:46 — forked from johnelf/rfc793
TCP
Transmission Control Protocol
Functional Specification
+---------+ ---------\ active OPEN
| CLOSED | \ -----------
+---------+<---------\ \ create TCB
| ^ \ \ snd SYN
@331527583
331527583 / gcc 5 on ubuntu 14.04
Created June 5, 2017 06:07 — forked from beci/gcc 5 on ubuntu 14.04
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@331527583
331527583 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created June 5, 2017 06:06 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@331527583
331527583 / 30_haproxy_stats.sh
Created May 18, 2017 06:38 — forked from fangpsh/30_haproxy_stats.sh
open-falcon agent haproxy plugin
#!/bin/bash
#requires: socat
#author: fangpsh
#关于采集的Haproxy指标和报警阈值设置请参考:https://github.com/iask/haproxymon
set -eu
STATS_SOCKET="/var/lib/haproxy/stats"
HOST=`cat /etc/hostname`
DATE=`date +%s`
tmp_info="/tmp/haproxy_info"