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
set ts=2 sw=2 | |
set hlsearch | |
syntax on | |
set fileencodings=ucs-bom,utf-8,cp936 | |
if has("gui_macvim") | |
set gfn=Monaco:h13 | |
set transparency=8 | |
colorscheme desert | |
set go=egmt |
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 | |
# This is a script that help you get your team member's productivity | |
# by analyzing his/her code commiting in SVN repository, for the day before | |
# | |
# You can get a rough num for comparing between team members by using it in the way below | |
# ./svn_ana.sh SVN_ACCOUNT_NAME | wc -l | |
# | |
uname=vr | |
password=reader |
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
/* | |
* Wimax filter by Ricky Wen <cwen01390@cienet.com.cn> | |
*/ | |
#include <linux/types.h> | |
#include <linux/string.h> | |
#include <linux/fcntl.h> | |
#include <linux/if.h> | |
#include <linux/in.h> | |
#include <net/ip.h> | |
#include <net/tcp.h> |
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
#include "shaping.h" | |
#ifdef LINUX | |
#include <sys/time.h> | |
#include <time.h> | |
#include <string.h> | |
#include <assert.h> | |
#define OCT_CYCLES_PER_SECOND (1000000ull) |
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
CreditCard: { | |
TEST_NUMBERS: $w('378282246310005 371449635398431 378734493671000 30569309025904 38520000023237 6011111111111117 6011000990139424 5555555555554444 5105105105105100 4111111111111111 4012888888881881 4222222222222'), | |
isValid: function(number){ | |
if (number.blank()) return false; | |
if (Braintree.CreditCard.TEST_NUMBERS.include(number)) return false; | |
var total = ($A(number).reverse().inject(0, function(a, n, index) { | |
return a + $A((parseInt(n) * [1, 2][index % 2]).toString()).inject(0, function(b, o) { | |
return b + parseInt(o); |
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
#include <memory> | |
#include <time.h> | |
#include <vector> | |
#include <string> | |
#include <iterator> | |
#include <fstream> | |
#include <boost/shared_ptr.hpp> | |
#include <boost/interprocess/sync/scoped_lock.hpp> |
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 | |
if test $# -ne 1; then | |
echo "Usage: `basename $0 .sh` PROGRAM" 1>&2 | |
exit 1 | |
fi | |
GDB=${GDB:-gdb} | |
if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then |
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
#!/usr/bin/python | |
# Monitoring per-process disk I/O activity | |
# written by http://www.vpsee.com | |
import sys, os, time, signal, re | |
class DiskIO: | |
def __init__(self, pname=None, pid=None, reads=0, writes=0): | |
self.pname = pname | |
self.pid = pid |
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
function regExpMatch(url, pattern) { | |
try { return new RegExp(pattern).test(url); } catch(ex) { return false; } | |
} | |
function FindProxyForURL(url, host) { | |
url = url.toLowerCase(); | |
host = host.toLowerCase(); | |
var proxy = "PROXY 1.1.1.1:8999"; |
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
#ifndef __JeAllocator__HEADER__ | |
#define __JeAllocator__HEADER__ | |
#define JEMALLOC_NO_DEMANGLE 1 | |
#include "jemalloc/jemalloc.h" | |
template<typename T> | |
class JeAllocator { | |
public : | |
// typedefs |
OlderNewer