Skip to content

Instantly share code, notes, and snippets.

View cod7ce's full-sized avatar
🏠
Working from home

丁楠 cod7ce

🏠
Working from home
View GitHub Profile
@alex-zige
alex-zige / gist:82037e8588ec813e944f
Last active August 29, 2015 14:02
Mac OSX 10.10 RVM & Ruby

Fix Brew

Brew still using 1.8 ruby verison. but OSX 10.10 ship with 2.0.0 so symoblinking for now.

$ sudo mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
$ sudo ln -s /usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Brew update

@jshaw
jshaw / byobuCommands
Last active November 23, 2025 15:33
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@nightire
nightire / Changes in Rails 4_1.md
Last active September 28, 2025 09:55
拥抱 Rails 4 —— 详述 Rails 4 的新变化

Routes

小心地使用 Match(Rails 3 已实现)

Rails 3 提供了 match 方法供我们自定义 routes,然而我们要小心使用它以避免“跨站脚本攻击”(XSS Attack)。比如像这样的 routes:

注:(r3 代表 Rails 3,r4 代表 Rails 4)

# routes.rb
@mimosz
mimosz / nginx.conf
Created August 31, 2012 01:59
nginx + unicorn + padrino on ubuntu
# sudo ln -s ~/nginx.conf unicorn.conf
upstream app_server {
server unix:/tmp/unicorn_padrino.sock fail_timeout=0;
}
server {
listen 80;
charset utf-8;
server_name db.innshine.com;
@pksunkara
pksunkara / config
Last active November 6, 2025 15:19
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
# vi: ft=dosini
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[column]