Skip to content

Instantly share code, notes, and snippets.


Fangdun Cai fundon

Block or report user

Report or block fundon

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
fundon / .profile
Last active Nov 16, 2018
New macOS
View .profile
# ~/.profile
export HTTP_PROXY=
export PATH="$HOME/.cargo/bin:$PATH"
View fix-build-ios-deploy.diff
diff --git a/ios-deploy.xcodeproj/project.pbxproj b/ios-deploy.xcodeproj/project.pbxproj
index c58f9d8..6c46afe 100644
--- a/ios-deploy.xcodeproj/project.pbxproj
+++ b/ios-deploy.xcodeproj/project.pbxproj
@@ -317,7 +317,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "echo \"\\\"# AUTO-GENERATED - DO NOT MODIFY\\n\\\"\" > src/ios-deploy/\nawk '{ print \"\\\"\"$0\"\\\\n\\\"\"}' src/scripts/ >> src/ios-deploy/";
+ shellScript = "awk '{ print \"\\\"\"$0\"\\\\n\\\"\"}' src/scripts/ > src/ios-deploy/";
View gist:008e2a388473fb78f347c850344e1d9e
fundon /
Created Jul 5, 2017 — forked from KartikTalwar/
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs

2017 台式机

CPU : 英特尔 i7 7700k
主板: 华硕玩家国度(ROG)MAXIMUS IX HERO M9H主板
显卡: 华硕玩家国度 (ROG) STRIX-GTX1080-A8G-GAMING
硬盘: 英特尔 750 400G PCI-E NVMe SSD固态硬盘
机箱: 追风者(PHANTEKS)416PSTG 黑白色 中塔式机箱
电源: 美商海盗船(USCorsair)额定850W RM850i 电源 80PLUS金牌/C-Link/低载风扇停转

fundon / ES6: QuickStart and
Last active Sep 14, 2016
ES6: QuickStart and Tips
View ES6: QuickStart and

ES6: QuickStart and Tips

ES6: 快速体验,及实用小贴士

2016 年是 ES6 大力推广和普及的黄金时期,也是今年的流行趋势, 就一个 ES6 关键词, 在 GitHub 上就有这么多搜索结果。(赶紧跟上大部队!)

It's very hot!

fundon / app.js
Created Sep 1, 2016
benchmarks: koa vs toa vs egg vs trek
View app.js
'use strict';
module.exports = () => {
View gist:02a0fab262abbae82786a2af570bdf47
func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> Bool {
if self.selectedRow != -1 {
let rowView = tableView.rowView(atRow: self.selectedRow, makeIfNecessary: false) as? GMRowView
rowView?.isSelected = false
rowView?.backgroundColor = NSColor(red: 188/256, green: 188/256, blue: 188/256, alpha: 0)
if row != -1 {
self.selectedRow = row
let rowView = tableView.rowView(atRow: self.selectedRow, makeIfNecessary: false) as? GMRowView
rowView?.isSelected = true
fundon / Contents.swift
Created Jul 24, 2016
View Contents.swift
//: To run this playground start a SimpleHTTPServer on the commandline like this:
//: `python -m SimpleHTTPServer 8000`
//: It will serve up the current directory, so make sure to be in the directory containing episodes.json
import UIKit
import PlaygroundSupport
fundon /
Created Oct 23, 2015
Using Docker Compose in Node.js Project
$ docker-compose stop
$ docker-machine stop dev
You can’t perform that action at this time.