This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/* Note, this is only for library interop code. This is *not* a good way to do things in pure Reason code. */ | |
module type GeneratorType { | |
type value('a); | |
type t('a); | |
type fn('a) = unit => t('a); | |
let valueGet: value('a) => option('a); | |
let doneGet: value('a) => bool; | |
/* | |
* Define a type that can be either a single string or a list of strings | |
*/ | |
type queryItem = | |
| Single(string) | |
| Multiple(list(string)); | |
/* | |
* Make a string “safe” by |
let recv = (client, maxlen) => { | |
let bytes = Bytes.create(maxlen); | |
let len = Unix.recv(client, bytes, 0, maxlen, []); | |
Bytes.sub_string(bytes, 0, len) | |
}; | |
let parse_top = top => { | |
let parts = Str.split(Str.regexp("[ \t]+"), top); | |
switch (parts) { |
# mix.exs | |
defmodule PhoenixRelaySample.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :phoenix_relay_sample, | |
version: "0.0.1", | |
elixir: "~> 1.2", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: [:phoenix, :gettext] ++ Mix.compilers, |
(** [dir_is_empty dir] is true, if [dir] contains no files except | |
* "." and ".." | |
*) | |
let dir_is_empty dir = | |
Array.length (Sys.readdir dir) = 0 | |
(** [dir_contents] returns the paths of all regular files that are | |
* contained in [dir]. Each file is a path starting with [dir]. |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |