I hereby claim:
- I am tilgovi on github.
- I am tilgovi (https://keybase.io/tilgovi) on keybase.
- I have a public key whose fingerprint is 9255 5CDE B2C1 5E97 0AD8 FDE8 5994 A5A1 8F13 626A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Return true if the given predicate is true for every Node of the tree. | |
| # The predicate function is invoked once for each Node in the tree. | |
| # An optional third argument specifies a traversal order and should be a | |
| # function that takes a Node and returns its successor. The default order is | |
| # DOM position order (pre-order). | |
| everyNode = (node, fn, next = preFirst) -> | |
| return !someNode(node, ((n) -> !fn(n)), next) | |
| # Return the first Node in the tree that matches the predicate. |
| commit 962fe64b4dd5b0a4b02fda6f08a7c81d0e40d961 | |
| Merge: 367c72c 595968e | |
| Author: Randall Leeds <[email protected]> | |
| Date: Mon Feb 9 14:47:14 2015 -0800 | |
| WIP on master: 367c72c Remove selenium test requirement | |
| diff --cc h/static/scripts/annotation-mapper-service.coffee | |
| index 62d2c08,62d2c08..d95fed1 | |
| --- a/h/static/scripts/annotation-mapper-service.coffee |
| // Function to check whether an anchor is currently attached to the document. | |
| function isAttached(anchor) { | |
| // If there are no highlights it is not attached at all. | |
| if (anchor.highlights == null) { | |
| return false; | |
| } | |
| // Check if any of highlights have since been removed from the document. | |
| for (var i = 0 ; i < anchor.highlights.length ; i++) { | |
| if (!document.contains(anchor.highlights[i])) { |
| diff --git a/h/static/scripts/stream-controller.coffee b/h/static/scripts/stream-controller.coffee | |
| index 1a275a1..ccb4575 100644 | |
| --- a/h/static/scripts/stream-controller.coffee | |
| +++ b/h/static/scripts/stream-controller.coffee | |
| @@ -5,26 +5,32 @@ module.exports = class StreamController | |
| this.inject = [ | |
| '$scope', '$rootScope', '$routeParams', | |
| 'auth', 'queryParser', 'searchFilter', 'store', | |
| - 'streamer', 'streamFilter', 'annotationMapper' | |
| + 'streamer', 'streamFilter', 'threading', 'annotationMapper' |
| diff --git a/h/static/scripts/annotator/monkey.coffee b/h/static/scripts/annotator/monkey.coffee | |
| index da800da..51c8561 100644 | |
| --- a/h/static/scripts/annotator/monkey.coffee | |
| +++ b/h/static/scripts/annotator/monkey.coffee | |
| @@ -9,6 +9,12 @@ Util = Annotator.Util | |
| delete Annotator.prototype.events[".annotator-hl mouseover"] | |
| delete Annotator.prototype.events[".annotator-hl mouseout"] | |
| +# Add createHighlight | |
| +Annotator.prototype.createHighlight = -> |
| function MyPlugin(element, options) { | |
| Annotator.Plugin.call(this, element, options); | |
| // At this point, `this.element` will be a jQuery-wrapped reference to | |
| // the element argument and `this.options` will be a copy of the options | |
| // object (if any) that you define on the prototype with overrides specified | |
| // by the argument to this function. See below for more. | |
| this.options.someObject = {}; // See below. | |
| } |
| var Annotator = require('annotator'); | |
| function dump(data) { | |
| var result = {}; | |
| result['@context'] = 'http://www.w3.org/ns/oa-context-20130208.json'; | |
| if (typeof(data.id) !== 'undefined') { | |
| result['@id'] = data.id; |
| angular.module('h.history', [ | |
| 'h.settings' | |
| ], | |
| [ | |
| '$provide', 'settings' | |
| ($provide, settings) -> | |
| if settings.framed | |
| $provide.decorator '$window', captureHistory | |
| $provide.decorator '$sniffer', forceHistory | |
| ]) |
| # Log localhost port 8000 in the background | |
| sudo tcpdump -i lo tcp port 8000 > log.txt & | |
| # Send 5 megabytes upload | |
| head -c5M /dev/urandom | curl -v -XPOST -d@- localhost:8000 | |
| # End the tcpdump and cat the log file | |
| fg | |
| ^C | |
| cat log.txt |