Skip to content

Instantly share code, notes, and snippets.

View jroes's full-sized avatar

Jon Roes jroes

  • Streamlit
  • Charlotte, NC
  • X @jroes
View GitHub Profile
1. Understand Semantic Markup
2. Understand the difference between DIV and SPAN
3. Understand the difference between ID and CLASS
4. What is meant by separation of content and presentation?
5. What HTML tags should you use to define a menu? Provide an example.
6. Why is <br /> bad?
7. What is the difference between margin and padding?
require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'pointers'
class ListNodeTest < Test::Unit::TestCase
context "A LinkedList instance" do
setup do
@list =
jQuery(document).ready(function($) {
bgiframe: true,
autoOpen: false,
height: 400,
width: 720,
modal: false,
zIndex: 50,
buttons: {
Done: function() {
class Object
def method(m)
`grep -Rn "def #{m}" .`
def classmethod(m)
`grep -Rn "def self.#{m}" .`
jroes / rbl.rb
Created October 16, 2009 14:36 — forked from anonymous/rbl.rb
require 'rubygems'
require 'net/dns/resolver'
module Rack
class RBL
# List of RBL servers to check against
attr_accessor :servers
irb(main):010:0> @trip.stops
~ (0.000097) SELECT "id", "trip_id", "place_id" FROM "stops" WHERE "trip_id" = 19 ORDER BY "id"
=> [#<Stop @id=28 @trip_id=19 @place_id=28>, #<Stop @id=29 @trip_id=19 @place_id=29>, #<Stop @id=30 @trip_id=19 @place_id=30>]
irb(main):011:0> @trip.stops[-1..1]
=> []
#expected last 2:
=> [#<Stop @id=29 @trip_id=19 @place_id=29>, #<Stop @id=30 @trip_id=19 @place_id=30>]
When /^I fill in "([^\"]*)" within "([^\"]*)" with "([^\"]*)"$/ do |field, parent, value|
within(parent) do
fill_in(field, :with => value)
jroes / gist:1987346
Created March 6, 2012 16:38
Play Warcraft 2 "work complete" sound with shell alias `beep`
# Adds a shell alias `beep` that plays the "Work Complete!" sound from Warcraft 2 on OSX via afplay.
# Just add `&& beep` to the end of any long-running CLI process. Useful if you aren't a Growl user.
# rake db:reset && rake db:test:prepare && beep # => You'll hear "Work Complete!" when it's done.
# Jon Roes <>
-export([connect/2, loop/1]).
-define(nickname, "jroes-test").
-define(channel, "#jroes-test").
% Connect to an IRC server with a given Host and Port. Set up the TCP option to
% give us messages on a line-by-line basis.
connect(Host, Port) ->
{ok, Sock} = gen_tcp:connect(Host, Port, [{packet, line}]),
var mongoose = require('./../mongoose');
, ' mongoose version: '
, mongoose.version
, '========\n\n'
var Schema = mongoose.Schema;