Skip to content

Instantly share code, notes, and snippets.

View burtlo's full-sized avatar

Lynn Frank burtlo

View GitHub Profile
@burtlo
burtlo / TSFPersonalInfoViewController.m
Created June 6, 2013 04:10
Rubymotion vs Objective-C
//
// TSFPersonalInfoViewController.m
// Trail Safe
//
// Created by Franklin Webber on 6/1/13.
// Copyright (c) 2013 Trail Safe. All rights reserved.
//
#import "TSFPersonalInfoViewController.h"
#import "TSFUser.h"
@burtlo
burtlo / ghfm.css
Last active December 17, 2015 22:59
Redcarpet with Rouge
.highlight {
-moz-border-radius:3px;
-webkit-border-radius:3px;
background:transparent;
}
.highlight pre {
background-color:#f8f8f8;
border-radius:3px;
border:1px solid #ccc;
class SumOfMultiples
def self.to(input)
new(3,5).to(input)
end
def initialize(*params)
@params = params
end
require 'spec_helper'
describe ApplicationController do
describe "#require_login" do
context "when the user is logged in" do
it "does nothing" do
end
end
context "when the user is not logged in" do
@burtlo
burtlo / anagram.rb
Last active December 16, 2015 14:59
class String
def char_counts_hash
char_hash = Hash.new(0)
each_char {|char| char_hash[char] += 1 }
char_hash
end
def anagram_of?(word)
word.char_counts_hash == char_counts_hash
end
class Allergies
def initialize(score)
@score = score
end
attr_reader :score
def allergens
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=fxfxcxdxbxegedabagacad
export HISTCONTROL=ignoredups:erasedups
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=/usr/local/Cellar/wkhtmltopdf/0.9.9:$PATH
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=.:$PATH
@burtlo
burtlo / conway_spec.rb
Last active December 15, 2015 08:09
Kanye's Game of Life
class Point < Struct.new(:x,:y)
def self.at(x,y)
new x, y
end
def ==(other)
other.x == x and other.y == y
end
def around
@burtlo
burtlo / gist:5104644
Created March 7, 2013 00:55
Keep crying
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=fxfxcxdxbxegedabagacad
export HISTCONTROL=ignoredups:erasedups
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=/usr/local/Cellar/wkhtmltopdf/0.9.9:$PATH
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=.:$PATH
@burtlo
burtlo / gist:5095917
Created March 6, 2013 01:13
Parade presentation that will look for CSS and JS files within the sub-folder 'resources'
title "Example Presentation"
description "Several parade examples to assist with showing others how to get started with Parade"
pause_message "Visit github.com/schacon/parade"
resources "resources"
section "Introduction" do