Skip to content

Instantly share code, notes, and snippets.

View dirkkelly's full-sized avatar

Dirk Kelly dirkkelly

View GitHub Profile
Feature: Authentication (No Web Steps, Declarative)
As A User
In order to gain access to skynet
I want to be able to login and logout
Background:
Given I have a valid account
Then I should be able to login
@dirkkelly
dirkkelly / console
Created October 7, 2011 02:56
Spine.js Mobile Routing (http://spinejs.com/docs/routing)
Uncaught Unknown record
Model.find
ProfilesShow.active
__bind
Profiles.routes./profiles/:id
Module.proxy
__bind
Spine.Route.Route.match
Spine.Route.Route.matchRoute
Spine.Route.Route.navigate
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github.com:mostlydisco/swoonme.com.git
fetch = +refs/heads/*:refs/remotes/origin/*
[gitflow "branch"]
class RavensController < SiteController
no_login_required
skip_before_filter :verify_authenticity_token
def update
response = CreateSend::Subscriber.add params[:list], params[:email], params[:name], nil, true
respond_to do |format|
{
:en => {
:time => {
:formats => {
:day => "%A",
:date => lambda { |time, _| "#{time.day.ordinalize} %B" },
:time => "%k%p",
:full => lambda { |time, _| "%A #{time.day.ordinalize} %B at %k%p" },
}
}
@dirkkelly
dirkkelly / nginx
Created July 26, 2011 15:59
Nginx init.d Script
/init.d/nginx
#!/bin/sh
# SOURCE http://snipplr.com/view/6125/ubuntudebian-nginx-initd-script/
# Modified for Babushka use
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=SETME
CONFIG_FILE=SETME
@dirkkelly
dirkkelly / gist:1045174
Created June 24, 2011 16:40
madison products
{% paginate products.all.order_by_max_price_asc.search by 15 %}
<ol>
<li><ol>
{% for product in paginate.collection %}
<li>
@dirkkelly
dirkkelly / gist:1014266
Created June 8, 2011 11:43
product groups
{% for field in products.all.product_group_fields.style %}
{% for style in field.field_values %}
<li><a href="/wines?style={{style.value}}">{{ style.value }}</a></li>
{% endfor %}
{% endfor %}
@dirkkelly
dirkkelly / gist:945918
Created April 28, 2011 06:41
product_template.liquid
We couldn’t find that file to show.
@dirkkelly
dirkkelly / gist:945910
Created April 28, 2011 06:36
product_types.liquid
{% extends 'parent' %}
{% block body %}
{% for wine in contents.wines %}
<a href="/all_of_our_wines/{{wine._permalink}}">{{wine.title}}</a>
{% endfor %}
{% for shirt in products.shirts %}
<a href="/all_of_our_shirts/{{shirt._permalink}}">{{wine.title}}</a>
{% endfor %}