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
| /** | |
| * Diff Match and Patch | |
| * | |
| * Copyright 2006 Google Inc. | |
| * http://code.google.com/p/google-diff-match-patch/ | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * |
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
| $.post(location.href+'/unpublish/', function(response) { console.dir(response) }); |
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
| $.post('http://storify.com/dshaw/packing-for-sf/unpublish/', function(response) { console.dir(response) }); |
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
| <div class="stream-item-content tweet stream-tweet " data-tweet-id="292671788679169" data-item-id="292671788679169" data-screen-name="gruber" data-user-id="33423" data-classic-retweet-action="true" data-storify-permalink="http://twitter.com/gruber/status/292671788679169"> | |
| <div class="tweet-dogear "></div> | |
| <div class="tweet-image"> | |
| <img height="48" width="48" src="http://a3.twimg.com/profile_images/546338003/gruber-sxsw-final_normal.png" alt="John Gruber" class="user-profile-link" data-user-id="33423"> | |
| </div> | |
| <div class="tweet-content"> | |
| <div class="tweet-row"> | |
| <span class="tweet-user-name"> | |
| <a class="tweet-screen-name user-profile-link" data-user-id="33423" href="/#!/gruber" title="John Gruber">gruber</a> |
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
| <div class="component"> | |
| <div class="tweet-media"> | |
| <div class="dailybooth"> | |
| <a class="inline-media-image" data-inline-type="DailyBooth" href="http://dailybooth.com/pamelafox/9884843" target="_blank"><img src="http://cdn2.dailybooth.com/5/pictures/large/cd75a8852f0d648d2de6a28e9317a2e3_9884843.jpg"></a> | |
| </div> | |
| <div class="media-attribution"> | |
| <span>via</span><img width="16px" height="16px" src="http://dailybooth.com/favicon.ico"><a target="_blank" data-media-type="DailyBooth" class="media-attribution-link" href="http://dailybooth.com">DailyBooth</a> | |
| </div> | |
| </div> | |
| <hr class="component-spacer"> |
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 minVersion(version) { | |
| var $vrs = window.jQuery.fn.jquery.split('.'), | |
| min = version.split('.'); | |
| for (var i=0, len=$vrs.length; i<len; i++) { | |
| console.log($vrs[i], min[i]); | |
| if (min[i] && $vrs[i] < min[i]) { | |
| return false; | |
| } | |
| } | |
| return true; |
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
| // Optimize gamecast with ( http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/listener.js#L83-90 ): | |
| Listener.prototype.broadcast = function(message, except){ | |
| for (var i = 0, k = Object.keys(this.clients), l = k.length; i < l; i++){ | |
| if (this.clients[k[i]] && (!except || [].concat(except).indexOf(this.clients[k[i]].sessionId) == -1)){ | |
| this.clients[k[i]].send(message); | |
| } | |
| } | |
| return this; | |
| }; |
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 doHash(str, seed) { | |
| var m = 0x5bd1e995; | |
| var r = 24; | |
| var h = seed ^ str.length; | |
| var length = str.length; | |
| var currentIndex = 0; | |
| while (length >= 4) { | |
| var k = UInt32(str, currentIndex); | |
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
| # set temporary environment variable | |
| export PORT=8888 | |
| # Expresso test with code coverage | |
| expresso -I lib-cov test/* |
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
| // From jQuery source | |
| // Calculate pageX/Y if missing and clientX/Y available | |
| if ( event.pageX == null && event.clientX != null ) { | |
| var doc = document.documentElement, body = document.body; | |
| event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); | |
| event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); | |
| } |