This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 Junqing Tan <ivan@mysqlab.net> and The Go Authors | |
// Use of this source code is governed by a BSD-style | |
// Part of source code is from Go fcgi package | |
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15 | |
// By: wofeiwo | |
package fcgiclient | |
import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update qqwry ip data | |
# suggest cron: | |
# 30 5 * * 3,5 /full_path/update_qqwry_ip.sh >> /full_path/update_qqwry_ip.log | |
# @author yinheli | |
# @update 2014-02-23 | |
script_dir=`dirname $0` | |
# check unrar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
链接数据库 uri | |
username:passworkd@tcp(host:port)/dbname?charset=utf8&loc=Asia%2FShanghai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package leakybuf provides leaky buffer. | |
// It's based on the example in Effective Go. | |
package main | |
type LeakyBuf struct { | |
bufSize int // size of each buffer | |
freeList chan []byte | |
} | |
// NewLeakyBuf creates a leaky buffer which can hold at most n buffer, each |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sun.misc.BASE64Decoder; | |
import sun.misc.BASE64Encoder; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.SecretKeySpec; | |
/** | |
* @author yinheli | |
*/ | |
public class AESUtil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReplayPlugin extends Plugin | |
constructor: (@widget) -> | |
super @widget | |
@editor = @widget | |
$('.bbp-admin-links a').on 'click', (e) => | |
node = $(e.currentTarget).parent().parent().find('.bbp-author-name').clone() | |
node.text '@'+node.text() | |
@editor.trigger 'focus' | |
@editor.selection.insertNode node.append(' ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package socks5 | |
import ( | |
"net" | |
"time" | |
"bytes" | |
"errors" | |
"bufio" | |
"strconv" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (/(10\.\d{1,3}\.\d{1,3}\.\d{1,3})|(172\.(1[6789]|2[0-9]|3[01])\.\d{1,3}\.\d{1,3})|(192\.168\.\d{1,3}\.\d{1,3})/.test(ipAddr)) { | |
// Successful match | |
} else { | |
// Match attempt failed | |
} |
OlderNewer