Skip to content

Instantly share code, notes, and snippets.

Yi-Ting Cheng xdite

Block or report user

Report or block xdite

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
hSATAC / gist:5591270
Last active Dec 17, 2015
Shell function to send pull request using hub
View gist:5591270
# Usage: pr (pull request current branch into develop)
# Usage 2: pr stable (pull request current branch into stable)
# Notice: replace "team" with your github team account.
function pr() {
if [ "$1" == "" ]; then
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`;
penk /
Last active Jun 5, 2017
《TPB AFK 海盜灣 - 暫時離開》 中文字幕
00:01:47,959 --> 00:01:51,400
00:01:51,560 --> 00:01:57,400
jakeonrails / Ruby Notepad Bookmarklet
Created Jan 29, 2013
This bookmarklet gives you a code editor in your browser with a single click.
View Ruby Notepad Bookmarklet
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
xdite /
Created Jul 14, 2012
Ten (42) Things You Didn't Know Rails Could Do

Avoid jQuery When Possible

jQuery does good jobs when you're dealing with browser compatibility. But we're living in an age that fewer and fewer people use old-school browsers such as IE <= 7. With the growing of DOM APIs in modern browsers (including IE 8), most functions that jQuery provides are built-in natively.

When targeting only modern browsers, it is better to avoid using jQuery's backward-compatible features. Instead, use the native DOM API, which will make your web page run much faster than you might think (native C / C++ implementaion v.s. JavaScript).

If you're making a web page for iOS (e.g. UIWebView), you should use native DOM APIs because mobile Safari is not that old-school web browser; it supports lots of native DOM APIs.

If you're making a Chrome Extension, you should always use native APIs, not only because Chrome has almost the latest DOM APIs available, but this can also avoid performance issue and unnecessary memory occupation (each jQuery-driven extension needs a separate

You can’t perform that action at this time.