Skip to content

Instantly share code, notes, and snippets.

View motdotla's full-sized avatar
💛

mot motdotla

💛
View GitHub Profile
# config/app_config.yml
# Keep this out of version control if you have sensitive information!!
defaults: &defaults
name: Super Awesome Blog
tagline: My super awesome blog and stuff.
email: you@example.org
development:
<<: *defaults
# Override the defaults.
@motdotla
motdotla / deploy.rb
Created March 19, 2009 22:53 — forked from Sutto/deploy.rb
task :check_revision do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts ""
puts " \033[1;33m**************************************************\033[0m"
puts " \033[1;33m* WARNING: HEAD is not the same as origin/master *\033[0m"
puts " \033[1;33m**************************************************\033[0m"
puts ""
end
end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test2</title>
<link rel="stylesheet" type="text/css" media="all" href="css/uncompressed/reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/uncompressed/960.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/master.css" />
</head>
@motdotla
motdotla / Info
Created May 4, 2009 23:01 — forked from jeromegn/Info
Structure
=========
Form
Fields
Elements
Label (optional but most common)
Element
Label (optional in case of a a checkbox or radio)
Input Checkbox/Radio
# Embedded Value for DataMapper (http://martinfowler.com/eaaCatalog/embeddedValue.html)
class Address
include DataMapper::EmbeddedValue
property :street, String
property :location, String
property :region, String
property :country, String
end
function(doc) {
if ( doc["couchrest-type"] == "Account" ) {
emit(doc._id, ["Account", doc]);
}
if ( doc["couchrest-type"] == "Contact" ) {
emit(doc.account_id, ["Contact", doc]);
}
}
// Data
[
{"_id":"pvg:IHC09A","_rev":"1-3881006720","nvic":"IHC09A","family":"159","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJU09A","_rev":"1-243536901","nvic":"IJU09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJV09A","_rev":"1-3794903136","nvic":"IJV09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJY09A","_rev":"1-1301614913","nvic":"IJY09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:J3X09A","_rev":"1-1398113861","nvic":"J3X09A","family":"V8","couchrest-type":"GRD::Pvg","make":"ASTON MARTIN"}
]
// Map
namespace :bundler do
desc 'bundler install'
task :install do
run("gem install bundler --source=http://gemcutter.org")
end
desc 'bundler symlink vendor'
task :symlink_vendor do
shared_gems = File.join(shared_path, 'vendor/bundler_gems')
release_gems = "#{release_path}/vendor/bundler_gems/"
@motdotla
motdotla / setup-statsd.sh
Created June 16, 2012 18:17 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
Start here:
http://warwickp.com/2012/03/vagrant-box-with-graphite-statsd-gdash-nginx
@motdotla
motdotla / gist:3717570
Created September 13, 2012 20:54 — forked from jcblw/gist:3717552
Angular JS routeParams
/* Services */
//app
angular
.module('support', ['supportService'])
.config(['$routeProvider', function($routeProvider){
$routeProvider
.when('/p/:start', {templateUrl: '/partials/warrantyList.html', controller: SupportListController})
.when('/v/:field/:id/', {templateUrl: '/partials/warrantyDetails.html', controller: SupportDetailController})
.otherwise({redirectTo: '/p/1'});