Skip to content

Instantly share code, notes, and snippets.

View arthur-debert's full-sized avatar

Arthur Debert arthur-debert

View GitHub Profile
diff --git a/media/js/video/vimeovideosource.js b/media/js/video/vimeovideosource.js
index ad0d728..5cc2ca6 100644
--- a/media/js/video/vimeovideosource.js
+++ b/media/js/video/vimeovideosource.js
@@ -32,6 +32,17 @@ mirosubs.video.VimeoVideoSource = function(videoID, videoURL, opt_videoConfig) {
this.videoConfig_ = opt_videoConfig;
};
+mirosubs.video.VimeoVideoSource.forURL =
+ function(videoURL, opt_videoConfig)
@arthur-debert
arthur-debert / user-interaction-stats.js
Last active August 29, 2015 14:26
Quick & Dirty tracker of user UI
/*
Allows to quickly asses amount of work (clickes, key presses, page reloads)
users have to do while performing a task.
Usage:
var tracker = new UserInteractoinStats(); // once you will begin doing the stats
// Once you want to see results
tracker.stats();
This will also survive page loads, using local storage.
If you want to clear all data, just :
tracker.clear()

A couple of days ago a bunch of demo envs were failing to upload subtitles. Uploads would go through, but text would be empty (timming, number of subs, etc were ok). Could not repro locally, nor on staging, nor on dev. After a very fun debugging session, this is what happens:

  • babelsubs requires bleach
  • bleach requires an unpinned (latest) version of html5lib

Html5lib released a backwards incompatible release a couple of days ago. So, when creating a new env, pip would find the babelsubs dependency. Then the bleach dependency, then the html5lib, and would install the broken version. Everything 'worked' except bleach.clean would return an empty string instead of anything else.

Therefore, those new envs would get html5lib-1.01a which is broken, but our local installs would still be on 0.95 (which works). This is their bug report: mozilla/bleach#94

The fix (hopefully) is to load our pinned down version of html5lib before bleach so that when pip finds the dependency on bleach i