Skip to content

Instantly share code, notes, and snippets.

View GarthDB's full-sized avatar
🕸️
never updating status

Garth Braithwaite GarthDB

🕸️
never updating status
View GitHub Profile
#envato_dropdown
Part of
%img{:src=>'/img/envato.png', :alt=>'Envato'}
# Finished adapting your PATH environment variable for use with MacPorts.
#
[[ -s "/Users/garthdb/.rvm/scripts/rvm" ]] && source "/Users/garthdb/.rvm/scripts/rvm" # This loads RVM into a shell session.
auto: true
server: true
server_port: 4000
safe: true
source: .
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta content='description' name='description' />
<title>Nerd Radio</title>
<link href='css/main.css' media='screen' rel='stylesheet' />
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' type='text/javascript'></script>
<!--[if lt IE 7 ]>
<script src='http://html5shiv.googlecode.com/svn/trunk/html5.js' type='text/javascript'></script>
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
---
---
{% include reset.css %}
{% include default.css %}
---
layout: default
title: Portfolio
---
{% for post in site.posts %}
{% endfor %}
---
layout: episode
title: Test Episode
comment_count: 5
guest: Test Episode
host: <a href='http://www.twitter.com/garthdb'>Garth Braithwaite</a> and <a href='http://www.twitter.com/leifwells'>Leif Wells</a>
producer: <a href='http://www.twitter.com/artienorman'>Brad Feuerstein</a>
audio_url: http://traffic.libsyn.com/riaradio/35_Episode_35__Ben_and_Burman.m4a.mp3
image_url: /img/posts/comb_over_charlie.jpg
---
@GarthDB
GarthDB / gist:1293404
Created October 17, 2011 18:36
coffee script
i = 0
while i < (totalDigits-n.length)
pad += '0'
i++
@GarthDB
GarthDB / gist:1293429
Created October 17, 2011 18:46
user login
class UsersController < ApplicationController
def login
error = false;
@user = User.find_by_email(params['email']);
if(@user.nil?)
error = true
else
error = [email protected]_password?(params['password'])