Skip to content

Instantly share code, notes, and snippets.

mikelikesbikes / update_attribute_callbacks_broken.rb
Last active Jan 24, 2017
Demonstrates a bug in ActiveRecord 5.0 where callbacks are not invoked as part of calling `update_attribute`
View update_attribute_callbacks_broken.rb
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
gemfile(true) do
source ""
gem "rails", github: "rails/rails"
View babby.js
var babby = {
response: "wahhhh",
hello: function() {
babby.hello();{response: "I'm Stewie Griffin. Hello. </britishaccent>"})
View gist:9003932

DevBootcamp Phase 3 Prep


These are the Rails Guides for things we'll cover in Phase 3. They are a really good overview of Rails and some of the problems you'll solve as a web developer.

One suggestion: make sure you're trying things out on a project (e.g. a blog or todo app). This will help cement the code examples you'll read through in the Guide by applying them in your pet project.

  1. Getting Started
  2. ActionController Overview
mikelikesbikes / gist:8809504
Last active Aug 29, 2015
What'chu doin' Ruby?
View gist:8809504
$ ruby -e "a = (0..5).to_a; c = do |x| x*2; end; p c.class"
$ ruby -e "a = (0..5).to_a; c = { |x| x*2; }; p c.class"
$ ruby -e "a = (0..5).to_a; p do |x| x*2; end"
#<Enumerator: [0, 1, 2, 3, 4, 5]:map>
$ ruby -e "a = (0..5).to_a; p { |x| x*2; }"
[0, 2, 4, 6, 8, 10]
mikelikesbikes / gist:8726441
Created Jan 31, 2014
Post-DBc Reading List
View gist:8726441


  • Pragmatic Thinking and Learning
  • The Pragmatic Programmer
  • The Passionate Programmer
  • Apprenticeship Patterns
  • These books


  • Clean Code
  • Eloquent Ruby
mikelikesbikes / gist:8290978
Created Jan 6, 2014
Programming Learning Resources
View gist:8290978
mikelikesbikes / index.html
Last active Dec 27, 2015 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
View index.html
<!doctype html>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href=",400,600,700,800">
<link rel="stylesheet" href=",900">
<link rel="stylesheet" href="">
View index.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<script src="./zoo.js"></script>