Skip to content

Instantly share code, notes, and snippets.

View matthewglover's full-sized avatar

Matthew Glover matthewglover

View GitHub Profile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'pg'
gem 'haml-rails', '0.4'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/routes.rb')
watch('config/application.rb')
watch('config/environment.rb')
watch('config/environments/test.rb')
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
end
require 'rubygems'
require 'spork'
require 'database_cleaner'
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
RSpec.configure do |config|
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
config.generators do |g|
g.test_framework :rspec,
fixtures: true,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: true,
request_specs: false
g.fixture_replacement :factory_girl, dir: 'spec/factories'
end
development:
adapter: postgresql
encoding: unicode
database: [enter app_name]_development
pool: 5
username: [enter db user_name]
password:
test:
adapter: postgresql
//ES 6 code
// const RX = require('rx')
class EventEmitter {
constructor() {
this.__events = {};
}
on(eventName, handler) {
{-----------------------------------------------------------------
A "Tree" represents a binary tree. A "Node" in a binary tree
always has two children. A tree can also be "Empty". Below I have
defined "Tree" and a number of useful functions.
This example also includes some challenge problems :)
-----------------------------------------------------------------}
/******************************************************************************/
/***************** Global resets **********************************************/
/******************************************************************************/
/* Default to no padding and margin
Remove padding behaviour on widths */
*,
*:after,
*:before {
margin: 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Grid test</title>
<link rel="stylesheet" href="css/grid.css" media="screen" charset="utf-8">
</head>
<body>