Skip to content

Instantly share code, notes, and snippets.

Kai Zhang dexbol

Block or report user

Report or block dexbol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
1.获取用户昵称方法 cmshow.getUserNickname()


2.判断是否登录豹来电		cmshow.hasLogin()


3.调取登录弹窗		cmshow.Login()


4.跳转支付页面		cmshow.toPay()
dexbol / jMarquee-example.html
Last active Nov 3, 2017
jMarquee - jquery plugin can select polygon marquee in canvas
View jMarquee-example.html
<!DOCTYPE html>
<meta charset="utf-8">
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="jMarquee.js"></script>
<style type="text/css">
canvas {
float: left;
View redux-register.js
var reducerShape = {};
var makeFinalStateByReducerShape = function(shape, path, result, state,
action) {
if (typeof shape === 'function') {
var obj = result;
var value = state;
for (var i = 0; i < path.length - 1; i++) {
var key = path[i];
import os
import subprocess
import logging
import argparse
''' Make a python script as daemon.
python start|stop|restart
You can use this for some scenes such as subversion hooks or init.d
View index.html
<!DOCTYPE html>
<meta charset="utf-8" />
<title>html page</title>
userfile: <input type="file" /> <br />
<progress max="100" value="0"></progress> <br />
dexbol / gist:5324980
Created Apr 6, 2013
Cross document message
View gist:5324980
Boom.add('xstream', function(C) {
var TICKET = 'any random string 1';
var PING = 'any random string 2';
var PING_BACK = 'any random string 3';
var host = location.protocol + '//' + +
(location.port ? ':' + location.port : '');
var $ = jQuery;
var win = window;
# coding=utf-8
''' svn post-commit hook. checkout the repository and synchronizate to the
working copy. you can add some feature that you demand, e.g. after all, restart
your web server persuades the code changes to take effect.
import os
import logging
import sys
dexbol / gist:3760062
Created Sep 21, 2012
add commas to integer
View gist:3760062
function addComma(num) {
num = String(num);
var len = num.length;
var remainder = len % 3;
var h = num.substring(0, remainder);
var str = num.substring(remainder);
var i = 0;
var flag = str.length / 3;
var result = h ? [h] : [];
for (; i <f lag; i ++) {
You can’t perform that action at this time.