Skip to content

Instantly share code, notes, and snippets.

wangshijun wangshijun

Block or report user

Report or block wangshijun

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
wangshijun /
Created Aug 31, 2012
java: Continuous Recognition and Visualization of Pen Strokes and Touch-Screen Gestures
* Continuous Recognition and Visualization of Pen Strokes and Touch-Screen Gestures
* Version: 2.0
* If you use this code for your research then please remember to cite our paper:
* Kristensson, P.O. and Denby, L.C. 2011. Continuous recognition and visualization
* of pen strokes and touch-screen gestures. In Procceedings of the 8th Eurographics
* Symposium on Sketch-Based Interfaces and Modeling (SBIM 2011). ACM Press: 95-102.
wangshijun / index.js
Created Jul 11, 2019
forge recipers: transfer token from moderator to another account on
View index.js
/* eslint-disable no-console */
const base64 = require('base64-url');
const { fromSecretKey, fromRandom } = require('@arcblock/forge-wallet');
const { bytesToHex, isHexStrict, fromTokenToUnit } = require('@arcblock/forge-util');
const GraphqlClient = require('@arcblock/graphql-client');
const endpoint = process.env.FORGE_API_HOST || ''; // testnet
const client = new GraphqlClient(`${endpoint}/api`);
function ensureModeratorSecretKey() {
wangshijun / exchange.js
Created May 5, 2019
forge-js grpc-client exchange example
View exchange.js
/* eslint no-console:"off" */
* This script demonstrates how to do exchange tx with grpc-client
* Since exchange tx requires multi-parti-signature, it's complicated
* How to do a multisig?
* First of all, for a tx that you received, generate a new structure `Multisig`.
* Add `signer` (the address of the signer) and `data` field
* (if no extra data, please keep it as default value - `nil`).

Keybase proof

I hereby claim:

  • I am wangshijun on github.
  • I am wangshijun ( on keybase.
  • I have a public key ASAWLSvdvkCKWKbgY1EgD90zt_f_44Ll2t3AZEVolHtZKwo

To claim this, I am signing this object:

View markdownhere.css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;
wangshijun / detect_next.js
Created Aug 30, 2012
javascript: detect next page
View detect_next.js
* 检测下一页javascript层面的实现, 支持html5形式,时间复杂度n
* @author wangshijun <>
* @package default
* @subpackage default
* @copyright (c)
* @todo Implement this in a OOP style
View fake-referrer.casper.js
var fakeReferrer = ""
var targetUrl = ""
var casper = require('casper').create();
casper.start(fakeReferrer, function() {
wangshijun /
Created Feb 28, 2016 — forked from xjamundx/
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

- edit /opt/statsd/local.js
- correct the graphite host to localhost
- if desired, put 'debug: true' in there
- make the box accessible via the hostname 'graphite'
- update conf/storage-schemas.conf, see example for these retention rules:
6 hours of 10 second data
1 week of 1 minute data
5 years of 10 minute data
You can’t perform that action at this time.