Skip to content

Instantly share code, notes, and snippets.

View itxx00's full-sized avatar
✈️
keep working

itxx00 itxx00

✈️
keep working
View GitHub Profile
set nocompatible "关闭vi兼容
set enc=utf-8
"set number "显示行号
filetype plugin on "文件类型
set history=500 "历史命令
syntax on "语法高亮
"set autoindent "ai 自动缩进
"set smartindent "智能缩进
set showmatch "括号匹配
set ruler "右下角显示光标状态行
@itxx00
itxx00 / core-emu
Last active December 25, 2015 02:19
http://stackoverflow.com/questions/12671587/isolated-test-network-on-a-linux-server-running-a-web-server-lightttpd-and-cu
https://code.google.com/p/coreemu/
http://stuff.onse.fi/man?program=ip-netns&section=8
http://blog.kghost.info/2013/03/01/linux-network-emulator/
http://blog.kghost.info/2013/03/27/linux-network-tun/
http://seravo.fi/2012/virtualized-bridged-networking-with-macvtap
http://blog.csdn.net/kl222/article/details/8513593
@itxx00
itxx00 / README.md
Created October 13, 2013 09:08 — forked from jpetazzo/README.md

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@itxx00
itxx00 / flashpolicyd.py
Created October 14, 2013 15:09
flashpolicyd.py
#!/usr/bin/env python
# Flash access policy server based on gevent
# Jan-Philip Gehrcke, June 2011
# Listen on port 843; send acess policy to client; disconnect.
from gevent.server import StreamServer
import datetime
@itxx00
itxx00 / show_bar
Created October 19, 2013 04:54
progress bar in bash
function show_bar() {
local i=0;local p=1;local c=">"
echo;echo
while true;do
local x=$(($(tput cols)-3));local y=$(($(tput lines)-2));i=$((i+1))
[ $(($i%$x)) -eq 0 ] && {
[ "$c" = ">" ] && c="<" || c=">"
}
[ "$c" = ">" ] && {
p=$((p+1));[ "$p" -ge $x ] && p=$x
@itxx00
itxx00 / gist:7565843
Created November 20, 2013 16:11
check_httpd_limits
#!/usr/bin/perl
# Copyright 2012 - Jean-Sebastien Morisset - http://surniaulula.com/
#
# This script is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This script is distributed in the hope that it will be useful, but WITHOUT
@itxx00
itxx00 / tengine.spec
Created February 17, 2014 07:47
tengine.spec
#
%define tengine_home %{_localstatedir}/cache/tengine
%define tengine_user tengine
%define tengine_group tengine
Summary: Web server originated by Taobao
Name: tengine
Version: 2.0.0
Release: 0%{?dist}
Vendor: taobao inc.
@itxx00
itxx00 / gist:9466571
Created March 10, 2014 14:58
autofsck
#/bin/bash
#########################################
#Function: auto fdisk
#Usage: bash auto_fdisk.sh
#Author: Customer service department
#Company: Alibaba Cloud Computing
#Version: 2.0
#########################################
count=0
@itxx00
itxx00 / gist:9467325
Created March 10, 2014 15:37
livecd-iso-to-disk
#!/bin/bash
# Transfer a Live image so that it's bootable off of a USB/SD device.
# Copyright 2007-2012 Red Hat, Inc.
#
# Jeremy Katz <[email protected]>
# Brian C. Lane <[email protected]>
#
# overlay/persistence enhancements by Douglas McClendon <[email protected]>
# GPT+MBR hybrid enhancements by Stewart Adam <[email protected]>
#
@itxx00
itxx00 / 1.sh
Last active August 29, 2015 14:00
discard-support
[root@localhost ~]$ rpm -q qemu-kvm
qemu-kvm-1.6.2-1.fc20.x86_64
[root@localhost ~]$ rpm -q libvirt-daemon
libvirt-daemon-1.1.3.4-4.fc20.x86_64