Skip to content

Instantly share code, notes, and snippets.

View kofj's full-sized avatar
💭
I may be slow to respond.

疯魔慕薇 kofj

💭
I may be slow to respond.
View GitHub Profile
@kofj
kofj / 1.json
Created November 10, 2014 12:44
解析json数据
{
"currTime": 1415617116876,
"result": "1",
"message": "",
"value": {
"UserID": "6e858035-083d-48b5-b822-74738e0d9434",
"UserName": "杨阳",
"MobilePhone": "18611645681",
"UserAccount": "18611645681",
"Province": "北京",
@kofj
kofj / docker-d.log
Created November 12, 2014 08:41
Aliyun ECS CentOS6.6 Docker dead error log
2014/11/12 16:38:18 docker daemon: 1.2.0 fa7b24f/1.2.0; execdriver: native; graphdriver:
[a7550805] +job serveapi(unix:///var/run/docker.sock)
[info] WARNING: You are running linux kernel version 2.6.32-358.6.2.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
[info] Listening for HTTP on unix (/var/run/docker.sock)
[a7550805] +job init_networkdriver()
[a7550805.init_networkdriver()] creating new bridge for docker0
Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
[a7550805] -job init_networkdriver() = ERR (1)
2014/11/12 16:38:18 Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
@kofj
kofj / DataTable.zh_CN.js
Created November 15, 2014 09:18
DataTable Chinese Demo
/**
* 评审结果列表
* @internal 此方法用于显示评审结果列表
* @since 2014-11-13 16:27:18
* @author FrankKung <[email protected]>
*/
$(document).ready(function() {
$('#datatables').dataTable( {
"bProcessing": true,
"bServerSide": true,
@kofj
kofj / Vagrantfile
Last active August 29, 2015 14:10
Use this vagrantfile startup a VM you can view it with a hostonly IP Address
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "docker"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder "./", "/vagrant"
end
@kofj
kofj / JQ1.9Fixe.patch.js
Created November 21, 2014 06:38
fixed the Jquery 1.9.1 can not found browser object
(function(jQuery){
if(jQuery.browser) return;
jQuery.browser = {};
jQuery.browser.mozilla = false;
jQuery.browser.webkit = false;
jQuery.browser.opera = false;
jQuery.browser.msie = false;
@kofj
kofj / FTTSR.cmd
Created December 26, 2014 08:06
Forbidden Tencent TAOFrame Service running
@echo off
set name="TAOFrame"
sc delete %name%
sc create %name%
exit
@kofj
kofj / cross.go.sh
Created January 26, 2015 03:17
# This script will build cross lib of go On you Mac.
#!/bin/bash
# This script will build cross lib of go On you Mac.
cd /usr/local/go/src
sudo CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./make.bash
sudo CGO_ENABLED=0 GOOS=linux GOARCH=386 ./make.bash
sudo CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./make.bash
Thread::try_create(): pthread_create failed with error 11common/Thread.cc: In function 'void Thread::create(size_t)' thread 7f463205f7c0 time 2015-04-25 02:21:54.883375
common/Thread.cc: 128: FAILED assert(ret == 0)
ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3)
1: (Thread::create(unsigned long)+0x8a) [0x7f4630f5ab9a]
2: (SafeTimer::init()+0x92) [0x7f4630f30792]
3: (librados::RadosClient::connect()+0xd3a) [0x7f4630e8caea]
4: (_cgo_4da98b952cf3_Cfunc_rados_connect()+0xc) [0x40229c]
5: bin/chm-server() [0x42e3e1]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
terminate called after throwing an instance of 'ceph::FailedAssertion'
for i in a b c d e f g h i j k l
do
sudo parted -s /dev/sd${i} mklabel gpt
sudo parted -s /dev/sd${i} mkpart sd${i} 0% 100%
sudo parted -s /dev/sd${i} print
sudo mkfs.xfs -f /dev/sd${i}1
UUID=$(blkid /dev/sd${i}1 -o value -s UUID)
FS=$(blkid /dev/sd${i}1 -o value -s TYPE)
sudo mkdir /mnt/sd${i}
@kofj
kofj / socks5.go
Last active August 29, 2015 14:26 — forked from maliubiao/socks5.go
Socks5RoundTripper for net/http
package socks5
import (
"net"
"time"
"bytes"
"errors"
"bufio"
"strconv"
"strings"