Skip to content

Instantly share code, notes, and snippets.

@nvolungis
nvolungis / flat-player-event-ingestion-spec.json
Last active March 26, 2020 18:25
basic ingestion spec for flat player events
{
"type": "kafka",
"ioConfig": {
"consumerProperties": {
"bootstrap.servers": "kafka:19092"
},
"topic": "stats_tap.flat_player_event.proto.v0",
"type": "kafka",
"taskCount": 1,
"replicas": 1
@nvolungis
nvolungis / streaming-webcam-upload.js
Created March 14, 2018 15:15
streaming webcam upload
const s3 = new AWS.S3();
const BUCKET = 'multipart-upload-test';
const FILENAME = `test-${Math.random()}.webm`;
const logSize = size => {
console.log(`current size: ${totalSize / (1024*1024)}mb`);
};
const createUpload = () => new Promise((resolve, reject) => {
const options = { Bucket: BUCKET, Key: FILENAME };
import React from 'react';
export const RAFHOC = Component => class RAF extends React.Component {
constructor() {
super();
this.state = { isRunning: false };
}
componentWillUpdate(nextProps, nextState) {
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
" call vundle#begin('~/some/path/here')
"
" let Vundle manage Vundle, required
# init
accum = [0, 0, ... duration/bucketSize]
display = [0, 0, ... duration/bucketSize]
#when adding a worm / worm change
display = accum.map (viewCount, index) ->
return viewCount if index < worm[0], index > worm[1]
return viewCount + 1
describe 'VulcanTransitioner' do
it 'should accept an account' do
end
it 'should switch the vulcan flag on for all medias in the account' do
end
<html>
<body>
<div id="wistia_m109px94wl" class="wistia_embed" style="width:600px;height:338px;">&nbsp;</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js"></script>
<script>
var shouldShowControls = Modernizr.touch;
wistiaEmbed = Wistia.embed("m109px94wl", {
controlsVisibleOnLoad: shouldShowControls,
@nvolungis
nvolungis / gist:5c232c13bd0d913075fb
Last active September 16, 2015 17:05
Julian's site
//Let's wrap this in a closure so we keep isHidden local
(function(){
var isHidden = true;
wistiaEmbedz46h62nme5.bind("secondchange", function (s) {
if(s >== 10 && isHidden) {
isHidden = false;
$('#lp-pom-button-26')
.css({'z-index':16777272})
@nvolungis
nvolungis / gist:a45a59b3ba344e5bdad1
Last active September 15, 2015 18:31
Modified embed include
<script type="text/javascript">
$(document).ready(function(){
var head = document.getElementsByTagName('head')[0],
ev1Script, metaDataScript;
ev1Script = document.createElement('script');
ev1Script.src = "//fast.wistia.com/assets/external/E-v1.js";
ev1Script.type = "text/javascript";
ev1Script.charset = "ISO-8859-1";
<div id="wistia_agmhsklp6p" class="wistia_embed" style="width: 640px; height: 388px;">
<h4 style="text-align: center;">
<object id="wistia_agmhsklp6p_seo" style="display: block; height: 360px; position: relative; width: 640px;" width="300" height="198" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="https://embed-ssl.wistia.com/flash/embed_player_v2.0.swf?2015-02-27">
<param name="allowfullscreen" value="true"><param name="bgcolor" value="#000000">
<param name="wmode" value="opaque"><param name="flashvars" value="autoPlay=false&amp;banner=false&amp;controlsVisibleOnLoad=true&amp;customColor=0ac8db&amp;endVideoBehavior=default&amp;fullscreenDisabled=true&amp;mediaDuration=91.971&amp;playButtonVisible=true&amp;quality=&amp;showPlayButton=true&amp;showPlaybar=true&amp;showVolume=true&amp;stillUrl=https%3A%2F%2Fembed-ssl.wistia.com%2Fdeliveries%2F6fb414e10137ba54ad2f25a05fe445c1696b84d6.bin%3Fimage_crop_resized%3D640x360&amp;unbufferedSeek=true&