Skip to content

Instantly share code, notes, and snippets.

View dougireton's full-sized avatar

Doug Ireton dougireton

View GitHub Profile
@dougireton
dougireton / gist:2023820
Created March 12, 2012 18:32
Chef cookbook
# stop and delete the default site
iis_site 'Default Web Site' do
action [:stop, :delete]
end
# create and start a new site that maps to
# the physical location C:\inetpub\wwwroot\testfu
iis_site 'Testfu Site' do
protocol :http
port 80
class ApplicationController < ActionController::Base
protect_from_forgery
require 'rack/mobile-detect'
use Rack::MobileDetect
# set the Rails request.format (MIME type) to :iphone for iPhone/iPod Touch
# This allows us to serve separate layouts/views for iPhone/iPod
case request.headers['X_MOBILE_DEVICE']
<%= flash.each do |key, msg| %>
<%= content_tag :div, msg, :class => key %>
<% end %>
#djDebug *{color:#888;float:none;margin:0;padding:0;position:static;text-align:left;}
#djDebug code{color:#333;}
#djDebug h3 code{color:#fff;}
#djDebug a{color:#ccc;}
#djDebug a:hover{color:#aaa;}
#djDebugToolbar{background:#333;height:30px;z-index:100000000;border-bottom:2px solid #222;position:absolute;top:0;left:0;right:0;}
#djDebugToolbarHandle{background:#555;height:30px;z-index:100000000;position:absolute;top:0;left:0;right:0;width:16px;}
#djDebugToolbarHandle ul li{padding:3px 0px 0px 3px;}
#djDebugToolbarHandle ul li a{font-size:16px;font-weight:bold;}
#djDebugToolbar ul{margin:0;padding:0;list-style:none;}