Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Zhigang Fang zhigang1992

:octocat:
Focusing
View GitHub Profile
@zhigang1992
zhigang1992 / renderRect.js
Created Jan 1, 2020 — forked from mlewand/renderRect.js
DOMRect visualisation - a small helper for visualizing DOMRect objects.
View renderRect.js
( function() {
/**
* A helper function to visualize DOMRect or set of DOMRect instances.
*
* Subsequent calls will remove previously marked elements.
*
* Debug a element currently focused in your devtools inspector.
* window.markRect( $0.getBoundingClientRect() );
* // Debug a selection.
* window.markRect( document.getSelection().getRangeAt( 0 ).getClientRects() );
View public.txt
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO2VOFP8l4mmyi04MwHOYyswr0dweS2GEbRslQnqsw5dY1Xfs+oWszevPeGJ6KRsCnd/ir7P+yrEOLK7GeybMqHMoIL0Ue6A+u8f+GtsfEGaH9TyWaNTmaXsmE45UY7m1Sz14rp5uITW7AYkP4b1aH5UWQmXloSWsCJDcQsViX4wKr9xqazZ8ThRy7uMTKnCD1sWRtPUGSV9PQ+Wj7Vh6BJO140JPyxp9NAIwt1G5zxWAJblcYicAzxiNcq76H46N3P59C1v1dUmsVNJRMdtGq2pfr4jY80JpUx86Scy9V10dy18zjwQBYRTtJwvqZ0xjfXtn+AeR+I7Or1Tvb0ev1 zhigang1992@gmail.com
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4aiQfU9mpfjB6hDC1+JXmNHCOfg8r2stRZY3xodGp9+W6IIfxDZ5Yz2Nx1DgEvTNCpJSnBpwoyOJ0/zsdVt0H3SLfwPewPGZFoZdTQn9JRmS/vFLYVChtfDbkw33XqyV3H9tT53bQG5K6O3+vbwfOjIXkDi4E/qoEgvOR5UG6Ey6KPLVb7w/6AePGQe+cL1CAip0i/kEwkyh0U3BrPtuV5WoUeCgJx9ihkmYEu9ecCie50N7Q48gWp8D72ivOyv9AVFsFyjEJDBgvVS5R2Muag/LIrylEsQY9o1ow5wFMztaACPGSoc0+8NM9FsW9HUImwl5M94WRzr3FHBAcnU3h macpro@Macs-Mac-Pro.local
@zhigang1992
zhigang1992 / watermark.command
Last active Aug 15, 2018
Watermarking folders of images. imagemagick required
View watermark.command
#!/bin/bash
# Put your files in origin folder
cd `dirname $0`
mkdir -p watermarked/origin
find origin -type d > watermarked/.dirs.txt
pushd watermarked
@zhigang1992
zhigang1992 / packages.json
Created Mar 27, 2018
blockchainbootstrap
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
zhigang1992 / StateFarm.ipynb
Created Jan 19, 2018
Learning/Lesson1/StateFarm.ipynb
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('https://cdn.rawgit.com/ryanoasis/nerd-fonts/1.2.0/patched-fonts/FiraCode/Light/complete/Fura%20Code%20Light%20Nerd%20Font%20Complete.otf') format('opentype');
}
@font-face {
font-family: "Fira Code Patched";
font-style: normal;
font-weight: 400;
View init.lua
myModifierMode = hs.hotkey.modal.new()
function binderToMods(from,to,mods,toMods)
local function f ()
myModifierMode.triggered = true
hs.eventtap.keyStroke(toMods, to, 1000)
end
myModifierMode:bind(mods, from, f, nil, f )
end
@zhigang1992
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';
View keybase.md

Keybase proof

I hereby claim:

  • I am zhigang1992 on github.
  • I am zhigang1992 (https://keybase.io/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: