Skip to content

Instantly share code, notes, and snippets.

View zztczcx's full-sized avatar

chenxu zhao zztczcx

  • Seek.com.au
  • Melbourne, Australia
View GitHub Profile
@zztczcx
zztczcx / rc,lua
Created July 16, 2012 11:51 — forked from fanzeyi/rc,lua
awesome.config
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
naughty.config.default_preset.width = 400
@zztczcx
zztczcx / novice_killer.user.js
Created November 30, 2012 11:28 — forked from lyricat/novice_killer.user.js
干掉V2EX上所有使用默认头像用户的发言。
// ==UserScript==
// @name v2ex novice killer
// @namespace http://shellex.info
// @author shellex(5h3ll3x@gmail.com)
// @description 干掉使用默认头像的人的发言
// @include http://www.v2ex.com/go/*
// @include http://v2ex.com/go/*
// @include http://www.v2ex.com/?tab=*
// @include http://v2ex.com/?tab=*
// @include http://www.v2ex.com/
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
/*jslint node: true, maxlen: 100 */
'use strict';
var fs = require('fs'),
log4js = require('log4js'),
async = require('async'),
NB_ITERATION = 150000;
function fileStreamSpeedTest(callback) {

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@zztczcx
zztczcx / README.md
Created December 15, 2015 10:33 — forked from xjdrew/README.md
苹果支付流程

预先说明

目前游戏里面出售的道具,都属于consumable products(消耗性商品),下面的说明流程都是针对这类商品的。别的类型商品处理方法,不完全一样。

注册支付接口回调

app启动的时候即注册支付队列消息的回调者,这个回调者应该是一个单体类,保证在app整个生命周期都存在。ios会回调之前未处理完成的订单。

- (id)init {
    if((self = [super init])) {
        [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
 }