Skip to content

Instantly share code, notes, and snippets.

View AlexWheeler's full-sized avatar

Alex Wheeler AlexWheeler

View GitHub Profile
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#clear screen w/ prefix 'c-l'
bind C-l send-keys 'C-l'
set -g default-terminal "screen-256color"
set -g utf8 on
match 'properties', to: 'properties#index', via: [:get, :post]
match 'properties', to: 'properties#index', via: [:get, :post]
match 'properties', to: 'properties#show', via: :all
get 'properties/:slug', to: 'properties#show', constraints: { slug: /[a-z]+\.\d+/ }
get 'dashboard', to: 'dashboard#index', constraints: { subdomain: 'staging' }
root 'iphone#index', constraints: lambda { |req| req.env['HTTP_USER_AGENT'] =~ /iPhone/ }
root 'web#index'
constraints(subdomain: ['admin', 'staging']) do
get 'properties', to: 'properties#show'
post 'properties', to: 'properties#create'
get 'dashboard', to: 'main#dashboard'
end
constraints(IphoneAdmin) do
#your routes
end
require 'rack'
#run proc { |env| ['200', { 'Content-Type' => 'text/html' }, ['code is a liability']] }
class MyRackApp
def call(env)
['200', { 'Content-Type' => 'text/html' }, ['code is a liability']]
end
end
run MyRackApp.new