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
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() {
base=$1;
if [ "$1" == "" ]; then
base="develop"
fi
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`;
@penk
penk / TPB.AFK.2013.480p.h264-SimonKlose.CHT.srt
Last active Jun 5, 2017
《TPB AFK 海盜灣 - 暫時離開》 中文字幕
View TPB.AFK.2013.480p.h264-SimonKlose.CHT.srt
1
00:01:47,959 --> 00:01:51,400
三名瑞典人於今日遭到逮捕
罪名是涉嫌架設-
2
00:01:51,560 --> 00:01:57,400
-全世界最大的非法下載站台
3
@jakeonrails
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="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" 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
xdite / 42-things.md
Created Jul 14, 2012
Ten (42) Things You Didn't Know Rails Could Do
View 42-things.md
View avoid-jquery-when-possible.md

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.