git clone https://github.com/joyent/node.git
cd node/
git checkout v0.4.5 # or any other version you'd like
./configure --debug
make install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GitHub.TreeSlider = function () { | |
| if (window.history && window.history.pushState) { | |
| function a() { | |
| if (e.sliding) { | |
| e.sliding = false; | |
| $(".frame-right").hide(); | |
| $(".frame-loading:visible").removeClass("frame-loading") | |
| } | |
| } | |
| if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // parses the text in a tweet and adds links to users, hash tags and urls | |
| parseTweet: function (text) { | |
| // parse urls | |
| text = text.replace(/[A-Za-z]+:\/\/[A-Za-z0-9_-]+\.[A-Za-z0-9_:%&~\?\/.=-]+/g, function(url) { | |
| return url.link(url) | |
| }) | |
| // parse usernames | |
| text = text.replace(/[@]+[A-Za-z0-9_-]+/g, function(u) { | |
| var username = u.replace("@","") | |
| return u.link("http://twitter.com/"+username) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * JavaScript Pretty Date | |
| * Copyright (c) 2008 John Resig (jquery.com) | |
| * Licensed under the MIT license. | |
| */ | |
| // Takes an ISO time and returns a string representing how | |
| // long ago the date represents. | |
| // modified to return DD MM format instead of undefined. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var s = "Fri Apr 09 12:53:54 +0000 2010"; | |
| var date = new Date(s.replace(/^\w+ (\w+) (\d+) ([\d:]+) \+0000 (\d+)$/, "$1 $2 $4 $3 UTC")); | |
| // Cross-browser, time-zone-aware parsing via JavaScript: | |
| // Tested on IE, Firefox, Safari, Chrome and Opera. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // with iPad | |
| navigator.userAgent.match(/mobile|iphone|ipod|blackberry|android|palm|windows\s+ce/i) | |
| // without iPad | |
| navigator.userAgent.match(/iphone|ipod|blackberry|android|palm|windows\s+ce/i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function configAddressBar (addHeight) { | |
| var defaultHeight = 50; | |
| if (typeof addHeight == "undefined") addHeight = 1; | |
| function hideAddressBar() { | |
| if(!window.location.hash) | |
| { | |
| if(document.height < window.outerHeight) | |
| { | |
| document.body.style.height = (window.outerHeight + defaultHeight + addHeight) + 'px'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # disable font smoothing / anti aliasing in Titanium Studio | |
| defaults write com.appcelerator.titanium AppleAntiAliasingThreshold 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function parseTheDashboardData(resp){ | |
| var httpStatus = resp.meta.status, | |
| httpMessage = resp.meta.msg, | |
| dashboardPostsArray = resp.response.posts; | |
| for (var i = 0; i < dashboardPostsArray.length; i++){ | |
| var current=dashboardPostsArray[i]; | |
| var blogName = current.blog_name | |
| , blogID = current.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| ... | |
| success: function(data) { | |
| var imageCount = $(data).filter('img').length; | |
| var imagesLoaded = 0; | |
| $(data).hide() | |
| .appendTo('#someDiv') | |
| .filter('img') | |
| .load( function() { | |
| ++imagesLoaded; |