Skip to content

Instantly share code, notes, and snippets.

View davsket's full-sized avatar

David Avellaneda davsket

View GitHub Profile

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@davsket
davsket / HTML5-ffmpeg.md
Last active August 29, 2015 14:10
Instructions to generate Ogg and Webm formats for HTML5 videos

Instructions to generate Ogg and Webm formats

These instructions let you generate ogg, webm and mp4 formats playable by all mayor borwsers:

Install homebrew

If you are in a mac, I recommend you to install homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install ffmpeg

With home brew you can easily install ffmpeg, but its important to install it with the codecs for ogg and webm: