running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
// Used to create, manage, and parse unique IDs. This code creates stripe-like IDs, | |
// (e.g., xx_000000000000000000000000000). It allows for a prefix and a 27 | |
// character ksuid separated by an underscore. The prefix makes it easy | |
// to visibly identify what the ID is for. | |
// | |
// Author: Kirk Morales | |
package util | |
import ( |
// Usage: go run main.go | node decode.js | |
/* | |
// main.go: | |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"net/http" | |
"github.com/asaskevich/govalidator" | |
) |
file, err := os.Open(path) | |
if err != nil { | |
return err | |
} | |
defer file.Close() | |
// Only the first 512 bytes are used to sniff the content type. | |
buffer := make([]byte, 512) | |
_, err = file.Read(buffer) | |
if err != nil { |
#!/usr/bin/env python | |
""" | |
File: autorotate.py | |
Origial Author: Damien Riquet <[email protected]> | |
Current Maintainer: Trinh Nguyen <dangtrinhnt[at]gmail[dot]com> | |
Description: This script provides an auto-rotate feature of pictures | |
USAGE: autorotate.py [-h] [--recursive] directory [directory ...] | |
positional arguments: |
# Steps we will take: | |
# 1. Change boot2docker image type (this will take long) | |
# 2. Resize image | |
# 3. Resize partion (using GParted) | |
# | |
# Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
# Stop boot2docker | |
boot2docker stop |
package main | |
import ( | |
"fmt" | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
) |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/j/vendor/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/j/vendor/underscore-min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/clappr.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/bemtv/alpha/p2phls.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/bemtv/latest/p2phlsstats.min.js"></script> | |
<title>Globo Media Control Test Page</title> |
# be sure to comment out the require 'capistrano/deploy' line in your Capfile! | |
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :application, 'my-cool-application' | |
# the base docker repo reference | |
set :name, "johns-stuff/#{fetch(:application)}" |