Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
CEO-ing

Hampton Catlin hcatlin

💭
CEO-ing
View GitHub Profile
View gist:80671
class ArticlesController < ApplicationController
make_resourceful do
actions :show, :index
before :index do
@lead_news_item = NewsItem.last
end
response_for :index do |format|
View gist:707082
puts "Does my code get in here?"
View reset.scss
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
View snippet.txt
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cairo configure 1.10.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.10.2 --with-x
## --------- ##
## Platform. ##
@hcatlin
hcatlin / SassMeister-input.scss
Created Nov 27, 2013
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$time: morning;
@if $time == morning { a { color: red; } }
@else if $time == afternoon { a { color: blue; } }
@else { a { color: gray; } }
@hcatlin
hcatlin / gist:7849723
Created Dec 7, 2013
pi by the digits.
View gist:7849723
var piDigit = function(i) {
if(i == 0) {
i = -1;
}
return (Math.PI + "").substring(i+1,i+2)
}
@hcatlin
hcatlin / gist:9179210
Created Feb 24, 2014
In all my years running open source projects, I've yet to have this happen...
View gist:9179210
Date: Sun, 23 Feb 2014 14:51:43 -0800
From: Michael Kalmykov <Michael@kovcreation.com>
To: contact@hamptoncatlin.com
Sender: michael.kalmykov.88@gmail.com
Subject: SASS
Semantically awful style sheets
You sir, have made my life more difficult. Details spared, I have to learn
your stupid language and rack my brain in your filthy bird shatted 'nests'.
View test.haml
%ul
%li One
%li Two
%li <a href="boo">Yo</a>
%li= link_to "boo", "Yo"
<li>a</li><li><a>b</a></li>
@hcatlin
hcatlin / RBResizer.swift
Created Jun 27, 2014
Swift Image Resizer
View RBResizer.swift
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
//
import UIKit
@hcatlin
hcatlin / SassMeister-input.scss
Created Oct 3, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v2.0.0)
// ----
/*!
*/
a {
color: red;
}
@import url("x");