Skip to content

Instantly share code, notes, and snippets.

View huangxiangdan's full-sized avatar

Danny Huang huangxiangdan

  • jihua
  • Beijing,China
View GitHub Profile
global
daemon
maxconn 490000
log 127.0.0.1 local0
pidfile /tmp/haproxy-queue.pid
defaults
log global
mode tcp
option redispatch
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" version="1.0">
<!-- Client side setup -->
<clients>
<client host="localhost" use_controller_vm="true" maxusers='100000'></client>
</clients>
<!-- Server side setup -->
--- mod_logdb.erl.orig 2010-05-12 17:21:38.000000000 +0300
+++ mod_logdb.erl 2010-05-12 16:22:34.000000000 +0300
@@ -0,0 +1,2088 @@
+%%%----------------------------------------------------------------------
+%%% File : mod_logdb.erl
+%%% Author : Oleg Palij (mailto,xmpp:[email protected])
+%%% Purpose : Frontend for log user messages to db
+%%% Version : trunk
+%%% Id : $Id: mod_logdb.erl 1360 2009-07-30 06:00:14Z malik $
+%%% Url : http://www.dp.uz.gov.ua/o.palij/mod_logdb/
@huangxiangdan
huangxiangdan / auto_build_for_umeng.rb
Created November 12, 2012 12:07
auto_build_for_umeng
require 'yaml'
# exec 'apktool d kecheng.apk output'
@cfg = YAML.load_file('config.yml')
default_channel = @cfg['default_channel']
system 'apktool d -f kecheng.apk output'
last_channel = default_channel
@cfg['channels'].split.each do |channel|
if channel != default_channel
puts "work with #{channel}"
# <meta-data android:value="Web" android:name="UMENG_CHANNEL"/>
/**
* @author Hakim El Hattab
*
* Recreates bitmap images using HTML text. Images are
* drawn onto a canvas element so that the pixels can
* be read. Letters, with colors matching the image pixels,
* are then placed at random locations on the screen.
*/
var Textify = function () {function w() {
b = new DAT.GUI({
@huangxiangdan
huangxiangdan / check_mysql.rb
Created April 26, 2012 01:19
a ejabberd extauth script
#!/usr/bin/env ruby
class NeterDbAuthorization
def initialize(config_file = 'config.yml')
# load config
require 'yaml'
@cfg = YAML.load_file(config_file)
# load logger
if @cfg['log']['file']
require 'logger'
@huangxiangdan
huangxiangdan / 12306.user.js
Created January 11, 2012 01:33 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js