Skip to content

Instantly share code, notes, and snippets.

View daz-codes's full-sized avatar

DAZ daz-codes

View GitHub Profile
@daz-codes
daz-codes / gist:1977173
Created March 5, 2012 07:13
DAZ4126 SCSS colors
$grey:#A1A794;
$yellow:#F1E166;
$banner:$yellow;
@daz-codes
daz-codes / gist:1977171
Created March 5, 2012 07:12
DAZ4126 SCSS settings
$normalfont: "Courier New", "Nimbus Mono L", Monospace;
$headingfont: Abel,"Liberation Sans",Helvetica ,Arial, "Nimbus Sans L", FreeSans, Sans-serif;
$basefontsize: 13px;
$thickness:6px;
$width: 90%;
$mainwidth: 62%;
$sidebarwidth: 32%;
@daz-codes
daz-codes / gist:1977169
Created March 5, 2012 07:11
DAZ4126 error pages
@@404
h1 404!
p That page is missing
@@500
h1 500 Error!
p Oops, something has gone terribly wrong!
@daz-codes
daz-codes / gist:1977164
Created March 5, 2012 07:10
Quotes for DAZ4126
@@quote1
blockquote rel="http://www.flickr.com/photos/nativephotography/4343566244/" We Do Things Differently Here
cite Anthony H Wilson
@@quote2
blockquote rel="http://shop.visitmanchester.com/store/product/2265/Quote-magnet---dark-blue/" They return the love around here, don't they?
cite Guy Garvey
@@quote3
blockquote rel="http://shop.visitmanchester.com/store/product/2265/Quote-magnet---dark-blue/" It All Comes from Here
@daz-codes
daz-codes / gist:1977159
Created March 5, 2012 07:08
DAZ4126 route and view
########### DAZ4126 website ###########
require 'bundler'
Bundler.require
get '/' do
@title = "DAZ, Made in Manchester"
slim :index
end
__END__
@daz-codes
daz-codes / gist:1974885
Created March 4, 2012 21:33
Sinatra configure block
########### configuration & settings ###########
configure do
set :name, ENV['NAME'] || 'DAZ4126'
set :author, ENV['AUTHOR'] || 'DAZ'
set :analytics, ENV['ANALYTICS'] || 'UA-XXXXXXXX-X'
set :javascripts, %w[ ]
set :fonts, %w[ Abel ]
set :markdown, :layout_engine => :slim
end
m[c=rand(3)]
def play(i)
m=%w(Rock Paper Scissors);m[c=rand(3)]+?,+%w(Draw Win Lose)[((m.index(i)||c-1)-c)%3]
end
@daz-codes
daz-codes / styles.scss
Created September 14, 2011 07:02
Just Do It! Scss Styles
$orange:#D78123;
$blue:#1E1641;
$green:#02d330;
$grey: #999;
$background:$blue;
$logo-color:white;
$logo-font:"Anton",sans-serif;
$heading-color:$orange;
$heading-font:"Anton",sans-serif;
@daz-codes
daz-codes / main.rb
Created August 10, 2011 16:38
Short, Long and Pretty Urls - Using Sinatra & DataMapper to demonstrate different types of urls
require 'sinatra'
require 'data_mapper'
require 'slim'
require 'digest/sha1'
DataMapper.setup(:default, ENV['DATABASE_URL'] || File.join("sqlite3://",settings.root, "development.db"))
class Note
include DataMapper::Resource
property :id, Serial