Skip to content

Instantly share code, notes, and snippets.

View jwrubel's full-sized avatar

James Wrubel jwrubel

View GitHub Profile
@polarblau
polarblau / config.ru
Created June 19, 2013 20:01 — forked from adamesque/config.ru
Protect a Middleman application via basic auth
require 'rubygems'
require 'middleman/rack'
protected_middleman = Rack::Auth::Basic.new(Middleman.server) do |username, password|
[username, password] == ['theuser', 'thepassword']
end
run protected_middleman
@jwrubel
jwrubel / gist:1986681
Created March 6, 2012 14:57
swf_tag syntax in slim (should work for haml too)
= swf_tag "name_of_swf", \
options={:dom_id => "dom_element", \
:size => "320x240", :version => "10.1", \
:flashvars => {"a" => "test"}, \
:params => {"menu" => "false", "wmode" => "direct"}, \
:attributes => { "align" => "left", "class" => "flash_css_class" }}
div(id="dom_element")