Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

CMGS CMGS

🎯
Focusing
View GitHub Profile
@CMGS
CMGS / vimrc
Last active Jul 15, 2017
vimrc
View vimrc
set autoindent
set hlsearch
set background=dark
set backspace=indent,eol,start
set cin
set encoding=utf-8
let &termencoding=&encoding
" 设置文字编码自动识别
set fileencodings=ucs-bom,utf-8,gbk,big5
set ambiwidth=double
View .vimrc
set autoindent
set hlsearch
set background=dark
set backspace=indent,eol,start
set cin
set encoding=utf-8
let &termencoding=&encoding
" 设置文字编码自动识别
set fileencodings=ucs-bom,utf-8,gbk,big5
set ambiwidth=double
View tmp
# Generated by confd
include "bird_aggr.cfg";
include "bird_ipam.cfg";
router id {{getenv "IP"}};
{{define "LOGGING"}}
{{$node_logging_key := printf "/host/%s/loglevel" (getenv "HOSTNAME")}}{{if exists $node_logging_key}}{{$logging := getv $node_logging_key}}
{{if eq $logging "debug"}} debug all;{{else if ne $logging "none"}} debug { states };{{end}}
{{else if exists "/global/loglevel"}}{{$logging := getv "/global/loglevel"}}
View b.py
# coding: utf-8
import gevent
from gevent import monkey; monkey.patch_all()
import time
from requests import Session
ans = {
u'92和160哪个数大?(请填数值)':'160', \
u'55和200哪个数大?(请填数值)':'200', \
u'700和222哪个数大?(请填数值)':'700', \
View a.conf.jinja
worker_processes {{worker_processes}};
error_log stderr info;
events {
worker_connections {{worker_connections}};
}
daemon off;
View redis.lua
local redis_c = require "resty.redis"
local ok, new_tab = pcall(require, "table.new")
if not ok or type(new_tab) ~= "function" then
new_tab = function (narr, nrec) return {} end
end
local _M = new_tab(0, 155)
View wtf.c
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
@CMGS
CMGS / 1.go
Last active Aug 29, 2015
falcon test
View 1.go
package main
import (
"fmt"
"time"
"github.com/open-falcon/agent/g"
"github.com/open-falcon/common/model"
)
@CMGS
CMGS / 1.go
Created May 18, 2015
各种测试
View 1.go
package main
import (
"fmt"
"net"
"os"
"runtime"
"github.com/docker/libcontainer/netlink"
)
View test.go
package main
import (
"fmt"
"net"
"os"
"syscall"
"github.com/docker/libcontainer/netlink"
"github.com/docker/libcontainer/system"
You can’t perform that action at this time.