This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# via: http://johndyer.name/post/ffmpeg-Settings-for-HTML5-h264-mp4-theora-ogg-vp8-webm.aspx | |
# | |
# Also, noteworthy for actually displaying said videos: | |
# http://mediaelementjs.com/ | |
# mp4 (H.264 / ACC) | |
ffmpeg -i %1 -b 1500k -vcodec libx264 -vpre slow -vpre baseline \ | |
-g 30 -s 640x360 %1.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$contrasted-default-dark: #000; | |
$contrasted-default-light: #fff; | |
@mixin contrasted($bg, $dark:$contrasted-default-dark, $light:$contrasted-default-light){ | |
background-color: $bg; | |
color: get_contrast_yiq($bg, $dark, $light); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/autorun' | |
class MyTest < MiniTest::Unit::TestCase | |
class SomeClass | |
def calls_takes_args | |
takes_args "hello world" | |
end | |
private | |
def takes_args arg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra/base' | |
require 'http_router_sinatra' | |
# With this simplistic approach, Sinatra apps must be leaf nodes in the rack graph | |
# Mounter nodes may be nested arbitrarily deeply however. | |
# Include Warden to authenticate whole sub-branches of the graph | |
class Mounter < HttpRouter | |
def mount(path, app) | |
route = add(path).partial.to(app) | |
mounter = app.respond_to?(:url_mount) ? app : nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "minitest/autorun" | |
require "mocha" | |
require "watchable" | |
describe Watchable do | |
subject do | |
Object.new.extend Watchable | |
end | |
it "has an empty list of watchers by default" do |