Skip to content

Instantly share code, notes, and snippets.

View charlietran's full-sized avatar
💭
hoolie doolie

Charlie Tran charlietran

💭
hoolie doolie
View GitHub Profile
@jpgls
jpgls / HLS-alt-audio-iOS8.md
Last active August 29, 2015 14:06
HLS Alternate Audio Tracks - iOS7 vs. iOS8

Changes to HLS Alternate Audio Tracks

iOS7 vs. iOS8

Since iOS 8 went live on Friday and I updated a few of my devices over the weekend, I decided to do some quick testing of web video playback. Wanted to see if there were any little, undocumented changes that would affect REPlayer, or our general approach to HTML video - like the changes to exiting fullscreen video that came in the update from iOS6->iOS71.

Overall, things seem pretty much the same between iOS7->iOS8, and in a quick runthrough, REPlayer looks to be working just fine.

One interesting change to note though, is that the native interface (iOS default controls used when video is fullscreen) for selecting Sub-Title/CC tracks - or Alternate Audio tracks when they're available - no longer seems to recognize/display the audio tracks in iOS8.

Sub-Title selection still works just fine, but the Audio Section (and Audio Tracks) do not display in iOS8. Confirmed that the testing m3u8 still contains Alternate Audio tracks in the m

@biomancer
biomancer / playlist_builder.rb
Created September 18, 2014 14:48
Generating i-frame and byterange m3u8 playlist from .ts video file for usage in HLS
module PlaylistBuilder
SEG_DURATION, PKT_SIZE, PKT_POS, PKT_TIME = 0,1,2,3
def self.extract_iframes_data(video_filepath)
raise "#{video_filepath} does not exists!" unless File.exists?(video_filepath)
iframes_data = []
cmd = "ffprobe -show_frames -select_streams v -of compact -show_entries packet=pts_time,codec_type,pos:frame=pict_type,pkt_pts_time,pkt_size,pkt_pos -i #{video_filepath.shellescape}"
frames_and_packets = nil
r = Benchmark.measure('') do
frames_and_packets = `#{cmd}`.split("\n")
@mtowers
mtowers / README.md
Last active February 26, 2020 16:34
A Dashing dashboard widget for displaying a graph of metrics data from Librato

Description

A Dashing widget for displaying a graph of metrics data from Librato

Dependencies

httparty

Add it to dashing's gemfile:

@garmjs
garmjs / Default (OSX).sublime-keymap
Last active February 23, 2016 15:07
My keymap for easy navigation on Sublime Text 3 Remap keymap # jj to switch on vim mode # Hidde sidebar = ctrl + b # Switch layouts exp: vertical split = vS , Switch in one layout = ctrl + 0 When you are on split layouts you can move file with key # Move Right = mR , Move Left = mL # Resize window right = rR ,Resize window left = rL # If you nee…
[
// Hidde Sidebar
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" },
// Switch with one layout
{
"keys": ["ctrl+0"],
"command": "set_layout",
"args":
{
@jamiew
jamiew / .bashrc
Created August 5, 2013 19:03
Uninstalling rvm in favor of rbenv + some rvm-flavored plugins
# 1. Edit ~/.bashrc and remove any rvm-loading code.
# 2. Then Add:
# Load rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export RBENV_ROOT=~/.rbenv
# Then:
# 3. Uninstall rvm
# 4. Restart shell/terminal
@deepak
deepak / Dockerfile
Last active March 6, 2020 06:01
Dockerfile for installing ruby using rbenv
# DOCKER-VERSION 0.4.8
# am facing issue
# https://github.com/dotcloud/docker/issues/1123
FROM ubuntu:12.04
MAINTAINER Deepak Kannan "deepak@codemancers.com"
RUN apt-get -y install python-software-properties
@willurd
willurd / web-servers.md
Last active May 6, 2024 13:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………