Skip to content

Instantly share code, notes, and snippets.

View mmcc's full-sized avatar
📺
Movin vidja bits

Matthew McClure mmcc

📺
Movin vidja bits
View GitHub Profile
@mmcc
mmcc / encrypted.md
Last active August 31, 2022 07:20
Encrypt / Decrypt MP3

Request

You can create an encrypted mp3 using Zencoder's encryption settings:

{
  "input": "s3://my-bucket/super-secret.mp3",
  "output": [
    {
      "format":"mp3",

"url":"s3://my-bucket/super-secret-encrypted.mp3",

@mmcc
mmcc / request.json
Last active December 17, 2015 16:38
Live CDN example
{
"live_stream": true,
"outputs": [
{
"label": "rtmp300",
"size": "480x270",
"video_bitrate": 300,
"live_stream": true
},
{
@mmcc
mmcc / index.html
Last active December 17, 2015 12:29
Video.js example cue plugin for Spree Conf.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
@mmcc
mmcc / stream_to_akamai.md
Last active January 12, 2018 11:27
Stream directly to Akamai

Directly push to Akamai with FMLE

Assuming you already have the appropriate Akamai credentials, you should have some information like this:

Primary: rtmp://p.ep12345.i.akamaientrypoint.net/EntryPoint
Backup:  rtmp://b.ep12345.i.akamaientrypoint.net/EntryPoint
User: ######
Pass: ******
Stream: [EVENT_ANGLE_BITRATE]@12345

Playback: http://zencoder_hd1_1-lh.akamaihd.net/[EVENT_ANGLE_BITRATE]@12345

@mmcc
mmcc / live_stream.rb
Created January 22, 2013 21:46
Really simple Ruby script to make a basic Live request to Zencoder with a few HLS outputs.
require 'rubygems'
require 'zencoder'
# Change these settings
s3_bucket = ''
Zencoder.api_key = ''
# Quick test to make sure the variables above are set...
if s3_bucket == '' || Zencoder.api_key == ''
puts "It appears you haven't set your S3 bucket or Zencoder API key..."
@mmcc
mmcc / layout.haml
Created November 30, 2012 22:17
Starting point for Haml + Sass + Bootstrap + Font Awesome
!!!
%html{ :xmlns => 'http://www.w3.org/1999/xhtml', :lang => 'en', 'xml:lang' => 'en' }
%head
%title Zenquest
%meta{ 'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8' }
%link{ :rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap.no-responsive.no-icons.min.css', :type => 'text/css' }
%link{ :rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css', :type => 'text/css' }
%link{ :rel => 'stylesheet', :href => '/screen.css', :type => 'text/css' }
%body
@mmcc
mmcc / mixins.scss
Created August 30, 2012 19:05
Common Sass mixins I use.
// Mixins
@mixin hover-ease($element, $time) {
-moz-transition: $element $time + s ease;
-o-transition: $element $time + s ease;
-webkit-transition: $element $time + s ease;
-ms-transition: $element $time + s ease;
}
@mixin corners($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
@mmcc
mmcc / gist.rb
Created June 26, 2012 17:25
destroy.js.erb not hiding
# Controller
respond_to :html, :js
# DELETE /users/1
def destroy
@student = User.find(params[:id])
@student.destroy
respond_with(@student)
rescue
puts $!.inspect, $@
render :nothing => true
@mmcc
mmcc / menu.js
Created December 27, 2011 21:45
tabpanel
WhyWait.views.Menu = Ext.extend(Ext.TabPanel, {
title: "menu",
iconCls: "note3",
initComponent: function() {
Ext.apply(this, {
defaults: {
styleHtmlContent: true
},
dockedItems: [{
xtype: "toolbar",
@mmcc
mmcc / menu.js
Created December 27, 2011 21:43
tabpanel
WhyWait.views.Menu = Ext.extend(Ext.TabPanel, {
title: "menu",
iconCls: "note3",
initComponent: function() {
Ext.apply(this, {
defaults: {
styleHtmlContent: true
},
dockedItems: [{
xtype: "toolbar",