Skip to content

Instantly share code, notes, and snippets.

View bpartridge83's full-sized avatar

Brian Partridge bpartridge83

View GitHub Profile
@bpartridge83
bpartridge83 / videojs-postmessage.js
Created June 22, 2020 15:56 — forked from brgaulin/videojs-postmessage.js
Video.js Window Postmessage
import videojs from 'video.js';
const throttle = (func, limit) => {
let inThrottle
return function () {
const args = arguments
const context = this
if (!inThrottle) {
func.apply(context, args)

Keybase proof

I hereby claim:

  • I am bpartridge83 on github.
  • I am bpartridge (https://keybase.io/bpartridge) on keybase.
  • I have a public key whose fingerprint is B1A0 D0A0 EBBD 40BB 3AAC 6B34 68E5 FF56 9FC1 3164

To claim this, I am signing this object:

[last: 2s] [cloudappx] (master) $ bundle exec rake parallel:create --trace
** Invoke parallel:create (first_time)
** Execute parallel:create
rake aborted!
cannot load such file -- timecop/time_extensions
rake aborted!
cannot load such file -- timecop/time_extensions
rake aborted!
cannot load such file -- timecop/time_extensions
rake aborted!
Fetching gem metadata from https://rubygems.org/./Users/bpartridge/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/bpartridge/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/bpartridge/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/openssl.bundle
Reason: image not found - /Users/bpartridge/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/openssl.bundle
@bpartridge83
bpartridge83 / Fix for Adobe Flash Player Settings Click issues in Chrome
Created August 15, 2012 20:59
The reason that the settings panel won't accept clicks is because the Flash element is positioned at a calculated partial-pixel, due to the margin-top property of 10%.
setTimeout(function(){
var $div = $('div:last'),
marginTop = parseFloat($div.css('margin-top'));
$div.css({
'margin-top' : Math.round(marginTop)
});
}, 250);
http://www.mongodb.org/display/DOCS/Aggregation+Framework+-+Expression+Reference#AggregationFramework-ExpressionReference-Composition
$add:[5, $divide:[12, 2], 7]
With expressions, I can make it work properly with the nested operations enclosed in their own object:
$add:[5, { $divide:[12, 2] }, 7]
/* --------- Test --------- */