Skip to content

Instantly share code, notes, and snippets.

View fundon's full-sized avatar
🎯
Focusing

Fangdun Tsai fundon

🎯
Focusing
View GitHub Profile
@fundon
fundon / unixtime-vs-iso8601.md
Last active August 29, 2015 13:56
REST API: 时间字段设计 Unix time vs ISO-8601

Unix time

  • 忽略milliseconds, length = 10
"created_at": 1360019238
  • length = 13
"created_at": 1360019238123
@fundon
fundon / bitshares-pts-dylib.txt
Last active August 29, 2015 13:56
otool -L BitShares-PTS
@executable_path/../Frameworks/libminiupnpc.8.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 945.18.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 45.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.39.0)
@executable_path/../Frameworks/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/libdb_cxx-4.8.dylib (compatibility version 0.0.0, current version 0.0.0)
@executable_path/../Frameworks/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
@executable_path/../Frameworks/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0

Features

  • 灰色游标
  • 同步鼠标滚动

Todo

  • 可配置化
    • 颜色
  • 字体
@fundon
fundon / atom-pane.coffee
Created April 4, 2014 04:51
subscribe pane active-changed
@subscribe @paneView, 'pane:active-item-changed', =>
@log 'pane:active-item-changed'
#@onActiveItemChanged()
@subscribe atom.workspaceView, 'pane-container:active-pane-item-changed', =>
@log 'pane-container:active-pane-item-changed'
#@onActiveItemChanged()
@subscribe @paneView.model.$activeItem, (item) =>
@log 233, item is @activeItem
@log item, @activeItem
return if item is @activeItem
require('fs').createReadStream('print-self.js').pipe(process.stdout)
package main
import (
"fmt"
"strings"
"time"
)
import "math/rand"
@fundon
fundon / pathing.md
Last active August 29, 2015 14:02
pathing - 一個簡單、快速 URL path 詞法分析器

https://github.com/fundon/pathing

語法:默認使用{}作爲標籤分隔符。

/posts/{id}       默認使用 [^/]+ 正則表達式.
/posts/{id:\\d+}  使用 `\d+` 正則表達式.

用例:

@fundon
fundon / gist:90c5df8f5f77a77ed341
Created January 28, 2015 15:37
JavaScript Tips

ECMAScript 标准

请解释以下结果:

  null == 0 // false
  null > 0 // false
  null >=0 // true
 [] == 0 // true
@fundon
fundon / .zshrc
Created March 23, 2015 11:11
Speed up zsh
if [ ! -d .git ]; then
return
fi