Skip to content

Instantly share code, notes, and snippets.

View c4pt0r's full-sized avatar

dongxu c4pt0r

View GitHub Profile
@c4pt0r
c4pt0r / jakiro.js
Created November 21, 2011 05:26
jakiro-comet-server
/*
* Jakiro
* @desc Yet Another Comet Server
* @author Dongxu Huang <[email protected]>
* @date 2011-11-18
*/
var port = 8899 // default listen port
var createServer = require("http").createServer // createserver function
var puts = require("util").puts // output log
@c4pt0r
c4pt0r / getword.js
Created November 22, 2011 08:44
firefox getword
/*
* @file getword.js
* @desc Get Word From Firefox 4+;
* @author Dongxu Huang <[email protected]>
* @date 2011-5-13
*
*/
var eventRangeParent = null;
var eventTarget = null;
var eventRangeOffset = null;
@c4pt0r
c4pt0r / makefile
Created December 31, 2011 09:28
my makefile template
SRCS=main.cpp class.cpp
INCLUDE=
CC=g++
OUTPUT=main
FLAG_LINK=-g -lpthread -o $(OUTPUT)
FLAG_COMPILE=-g -c
OBJS=$(SRCS:.cpp=.o)
RM=rm
$(OUTPUT):$(OBJS)
@c4pt0r
c4pt0r / makefile
Last active September 29, 2015 03:58
my makefile template 2
CC = gcc
CFLAGS = -c -Wall -g -Os
LD = $(CC)
LDFLAGS = -lfoo
TARGET = MyProject
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
all: $(TARGET)
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@c4pt0r
c4pt0r / vimrc
Created March 1, 2012 06:07
myvimrc
filetype plugin on
set hlsearch
" Use incremental searching
set incsearch
" Set standard setting for PEAR coding standards
set tabstop=4
set shiftwidth=4
" Auto expand tabs to spaces
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "leveldb/env.h"
namespace leveldb {
Env::~Env() {
}
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "leveldb/env.h"
namespace leveldb {
Env::~Env() {
}
# A sample Makefile for building Google Test and using it in user
# tests. Please tweak it to suit your environment and project. You
# may want to move it to your project's root directory.
#
# SYNOPSIS:
#
# make [all] - makes everything.
# make TARGET - makes the given target.
# make clean - removes all files generated by make.