Skip to content

Instantly share code, notes, and snippets.

View ravinggenius's full-sized avatar
🤔
likely thinking

Thomas Ingram ravinggenius

🤔
likely thinking
View GitHub Profile
class ListScanner
attr_reader :list
def initialize(list)
@list = list.freeze
reset!
end
def get
reply = list[@index]
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 1 column 35
---
title: Pink() Notes For 2012-08-02: Breakpoint
created_at: 2012-08-02 23:22:52 UTC
---

https://github.com/lesjames/Breakpoint

Pain Points To Solve

  • Fluid Layouts
require 'yaml'
YAML.load <<-YAML
---
- 12:00
YAML
# Ruby 1.9.2 returns [720] (minutes)
# Ruby 1.9.3 returns [43200] (seconds)
@ravinggenius
ravinggenius / vimshortcuts.html
Created October 11, 2011 22:41 — forked from dsanson/vimshortcuts.html
an HTML VIM movement cheatsheet for use with NerdTool
<!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">
<!--
This is an HTML version of a great [VIM movements cheatsheet][] designed by Ted Naleid.
I made this because I wanted more control over the way the text was displayed, and I'd rather tweak CSS than mess with Omnigraffle. If you just want Ted's graphic overlaid on your desktop, you should download the [transparent version] of the VIM movements cheatsheet.
I use it with [NerdTool][]. Sadly, NerdTool can't overlay transparent HTML. So I supply a background-image URL. You'll want to change that to something on your local filesystem. Here is a [screenshot][] of the results. The background image is taken from the always great [Bibliodyssey][], resized to the size of my screen.
@ravinggenius
ravinggenius / gist:976834
Created May 17, 2011 16:51 — forked from ntalbott/gist:958220
git log --no-merges --pretty=short --since="2011-04-25" --until="2011-05-01" | git shortlog
Duff OMelia (8):
Don't use an rvm gemset.
Fixed unit test.
Upgrade colored gem
Don't need the version for map_by_method gem.
Don't need to specify a version for the will_paginate_gem.
Upgrade the database_cleaner gem.
Upgraded mocha gem.
Fix exception we just received.
var eventColors = {
mouseover: 'red',
mouseout: 'blue',
click: 'yellow'
}
var highlight = function(event) {
Event.stop(event);
element = Event.element(event);
Element.setStyle(element, {backgroundColor: eventColors[event.type]});
.one
color: red
.two
color: red
.three
color: red
.four
color: red
.five
color: red
# The whole point of this file is to allow a site admin to specify what specific action OR page should be used for the home page.
class HomeController < ApplicationController
def index
# Setting[:site, :home_page] should return a string containing...
# a (url) path that corresponds to a specific node
# or
# a controller#action pair like what might be used for a route's :to option (action would likely be :index, but maybe not)
# or
# a controller#action#id triple which would allow actions (like :show) that require an id to be used
@charset 'utf-8'
$experimental-support-for-svg: true
$experimental-support-for-khtml: false
$experimental-support-for-microsoft: false
$experimental-support-for-mozilla: false
$experimental-support-for-opera: false
$experimental-support-for-webkit: false
@import '/home/thomas/.rvm/gems/ruby-1.9.2-p0@development/gems/scratch_pad-themes-default-0.0.1/lib/styles/_variables.sass'
@import 'compass/css3/font-face'
@import 'compass/reset/utilities'