Mountain Lion (10.8) has three main difference compared to Lion (10.7):
- XCode 4.4 does not install Command Line Tools by default
- X11 isn't available anymore
- The installed version of OpenSSL has some bugs
| // force certain pages to be refreshed every time. mark such pages with | |
| // 'data-cache="never"' | |
| // | |
| jQuery('div').live('pagehide', function(event, ui){ | |
| var page = jQuery(event.target); | |
| if(page.attr('data-cache') == 'never'){ | |
| page.remove(); | |
| }; | |
| }); |
| /*! | |
| * Small Walker - v0.1.1 - 5/5/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ | |
| // Walk the DOM, depth-first (HTML order). Inside the callback, `this` is the |
| var value = 'FAIL!!'; | |
| var obj = { value: 9000 }; | |
| // This is totally broken, because inner functions don't "inherit" the outer | |
| // function's `this` value. Instead, their `this` value is the global object. | |
| obj.broken = function() { | |
| function addToValue(n) { | |
| return this.value + n; | |
| } | |
| return addToValue(1); |
| /* | |
| * anchor-include pattern for already-functional links that work as a client-side include | |
| * Copyright 2011, Scott Jehl, scottjehl.com | |
| * Dual licensed under the MIT | |
| * Idea from Scott Gonzalez | |
| * to use, place attributes on an already-functional anchor pointing to content | |
| * that should either replace, or insert before or after that anchor | |
| * after the page has loaded | |
| * Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a> | |
| * Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a> |
| var circleCenterPt = new paper.Point(150, 300); | |
| var circleRadius = 75; | |
| var sineWaveLength = 300; | |
| var cosineWaveLength = 300; | |
| paper.setup($('canvas')[0]); | |
| var sineWaveStep = sineWaveLength/360; | |
| var cosineWaveStep = cosineWaveLength/360; | |
| var angle = 0; |
| # Credit http://stackoverflow.com/a/2514279 | |
| for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: