Skip to content

Instantly share code, notes, and snippets.


Chaos(拾锋) edokeh

View GitHub Profile
View iOS 技能图谱.md


  • Swift
  • Objective-C
  • C++/C
  • JavaScript


  • Mac OSX
  • iOS
View gist:8393897
Ruby 2.1.0 in Production: known bugs and patches
Last week, we upgraded the rails app to ruby 2.1.0 in production.
While testing the new build for rollout, we ran into a number of bugs. Most of
these have been fixed on trunk already, but I've documented them below to help
anyone else who might be testing ruby 2.1 in production.
@naruse I think we should backport these patches to the ruby_2_1 branch and
release 2.1.1 sooner rather than later, as some of the bugs are quite critical.
I'm happy to offer any assistance I can to expedite this process.
nightire / Changes in Rails
Last active Oct 11, 2019
拥抱 Rails 4 —— 详述 Rails 4 的新变化
View Changes in Rails


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

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

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

# routes.rb
wintercn / h5g
Last active May 19, 2017
HTML5 Canvas Game Template
View h5g
<meta charset="utf-8" />
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="yes" name="apple-touch-fullscreen"/>
isaacs /
Last active Jul 23, 2020
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
You can’t perform that action at this time.