Skip to content

Instantly share code, notes, and snippets.


Zhigang Fang zhigang1992

Block or report user

Report or block zhigang1992

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
View public.txt
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO2VOFP8l4mmyi04MwHOYyswr0dweS2GEbRslQnqsw5dY1Xfs+oWszevPeGJ6KRsCnd/ir7P+yrEOLK7GeybMqHMoIL0Ue6A+u8f+GtsfEGaH9TyWaNTmaXsmE45UY7m1Sz14rp5uITW7AYkP4b1aH5UWQmXloSWsCJDcQsViX4wKr9xqazZ8ThRy7uMTKnCD1sWRtPUGSV9PQ+Wj7Vh6BJO140JPyxp9NAIwt1G5zxWAJblcYicAzxiNcq76H46N3P59C1v1dUmsVNJRMdtGq2pfr4jY80JpUx86Scy9V10dy18zjwQBYRTtJwvqZ0xjfXtn+AeR+I7Or1Tvb0ev1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4aiQfU9mpfjB6hDC1+JXmNHCOfg8r2stRZY3xodGp9+W6IIfxDZ5Yz2Nx1DgEvTNCpJSnBpwoyOJ0/zsdVt0H3SLfwPewPGZFoZdTQn9JRmS/vFLYVChtfDbkw33XqyV3H9tT53bQG5K6O3+vbwfOjIXkDi4E/qoEgvOR5UG6Ey6KPLVb7w/6AePGQe+cL1CAip0i/kEwkyh0U3BrPtuV5WoUeCgJx9ihkmYEu9ecCie50N7Q48gWp8D72ivOyv9AVFsFyjEJDBgvVS5R2Muag/LIrylEsQY9o1ow5wFMztaACPGSoc0+8NM9FsW9HUImwl5M94WRzr3FHBAcnU3h macpro@Macs-Mac-Pro.local
zhigang1992 / watermark.command
Last active Aug 15, 2018
Watermarking folders of images. imagemagick required
View watermark.command
# Put your files in origin folder
cd `dirname $0`
mkdir -p watermarked/origin
find origin -type d > watermarked/.dirs.txt
pushd watermarked
zhigang1992 / packages.json
Created Mar 27, 2018
View packages.json
"name": "awesomeblockchainapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.1.1"
"scripts": {
zhigang1992 / StateFarm.ipynb
Created Jan 19, 2018
View StateFarm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View FiraCode.css
@font-face {
font-family: "Fira Code Patched";
font-style: normal;
font-weight: 200;
src: url('') format('opentype');
@font-face {
font-family: "Fira Code Patched";
font-style: normal;
font-weight: 400;
View init.lua
myModifierMode =
function binderToMods(from,to,mods,toMods)
local function f ()
myModifierMode.triggered = true
hs.eventtap.keyStroke(toMods, to, 1000)
myModifierMode:bind(mods, from, f, nil, f )
zhigang1992 / index.d.ts
Created May 23, 2017 — forked from hktonylee/index.d.ts
Typescript Typing Definition for react-native-fbsdk
View index.d.ts
declare module "react-native-fbsdk" {
import * as React from 'react'
export interface LoginResult {
isCancelled: boolean,
grantedPermissions?: Array<string>,
declinedPermissions?: Array<string>,
export type DefaultAudience = 'friends' | 'everyone' | 'only_me';

Keybase proof

I hereby claim:

  • I am zhigang1992 on github.
  • I am zhigang1992 ( on keybase.
  • I have a public key whose fingerprint is 0103 7CA4 43F7 C8AE 7AD8 4DC6 CED9 7610 6867 A1C0

To claim this, I am signing this object:

zhigang1992 / SwiftyJSON.swift
Created Dec 18, 2016
SwiftyJSON performant alternative
View SwiftyJSON.swift
struct JSON {
var value: Optional<NSObject>
subscript(index: Int) -> JSON {
get {
return JSON(value: value.flatMap({ value in
return (value as? NSArray).flatMap({
if $0.count > index && index >= 0 {
return $0[index] as? NSObject
You can’t perform that action at this time.