Skip to content

Instantly share code, notes, and snippets.

View niclin's full-sized avatar

Nic niclin

View GitHub Profile
@niclin
niclin / rails_convention.md
Last active March 22, 2019 17:39 — forked from xdite/gist:758319
Ruby / Rails Convention

Rails 開發注意要點

About Ruby Syntax

  • 編輯器設定 soft tab (space=2),以 2 格空白符號做為程式內縮距離(不分語言)。
  • 函式如果只有一個參數,就不強制打()
  • 函式如果有二個以上的參數,通通都要有 ()
    • (避免發生奇怪的paser bug跟保持專案一致性)
  • 字串限定用雙引號包覆
  • 善用 "#{str1} #{str3}" 等字串改寫技巧取代不需要的字串加法。
@niclin
niclin / tmux.conf
Created January 3, 2017 10:00 — forked from rajanand02/tmux.conf
Tmux configurations with status bar theme
# set prefix to control-f
set -g prefix C-f
#unbind system defined prefix
unbind C-b
# helps in faster key repetition
set -sg escape-time 0
# start session number from 1 rather than 0