Skip to content

Instantly share code, notes, and snippets.

👊
Focusing

Fangdun Cai fundon

👊
Focusing
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
fundon / .profile
Last active Nov 16, 2018
New macOS
View .profile
# ~/.profile
export HTTP_PROXY=http://127.0.0.1:9090
export HTTPS_PROXY=http://127.0.0.1:9090
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/lldb.py.h\nawk '{ print \"\\\"\"$0\"\\\\n\\\"\"}' src/scripts/lldb.py >> src/ios-deploy/lldb.py.h";
+ shellScript = "awk '{ print \"\\\"\"$0\"\\\\n\\\"\"}' src/scripts/lldb.py > src/ios-deploy/lldb.py.h";
View gist:008e2a388473fb78f347c850344e1d9e
https://battle.net/download/getInstallerForGame?os=MAC&version=LIVE&gameProgram=WARCRAFT_3
https://battle.net/download/getInstallerForGame?os=mac&locale=enUS&version=PTR&gameProgram=WARCRAFT_3
@fundon
fundon / Documentation.md
Created Jul 5, 2017 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

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
View hackintosh.md

2017 台式机

https://www.tonymacx86.com

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
fundon / ES6: QuickStart and Tips.md
Last active Sep 14, 2016
ES6: QuickStart and Tips
View ES6: QuickStart and Tips.md

ES6: QuickStart and Tips

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

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

It's very hot!

@fundon
fundon / app.js
Created Sep 1, 2016
benchmarks: koa vs toa vs egg vs trek
View app.js
'use strict';
module.exports = () => {
require('./koa');
require('./toa');
require('./trek');
};
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
fundon / Contents.swift
Created Jul 24, 2016
objcio/S01E01-networking
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
fundon / shut-down.sh
Created Oct 23, 2015
Using Docker Compose in Node.js Project
View shut-down.sh
$ docker-compose stop
$ docker-machine stop dev
You can’t perform that action at this time.