DHH's keynote at RailsConf 2014
A series of videos with well-respected programmers debating TDD with DHH
import argparse | |
from datetime import (datetime, timedelta) | |
import os | |
import re | |
import subprocess | |
class Commit(object): | |
def __init__(self, commit_id, fields): | |
self.commit_id = commit_id |
-- Crash Report log information -------------------------------------------- | |
See Crash Report log file under the one of following: | |
* ~/Library/Logs/DiagnosticReports | |
* /Library/Logs/DiagnosticReports | |
for more details. | |
Don't forget to include the above Crash Report log file in bug reports. | |
-- Control frame information ----------------------------------------------- | |
c:0001 p:0000 s:0003 E:001120 (none) [FINISH] |
interface INode<T> { | |
boolean hasNext(); | |
Node<T> getNext(); | |
T getValue(); | |
} | |
class Node<T> implements INode<T> { | |
private T value; | |
private INode<T> next; |
import java.io.IOException; | |
import java.io.InputStream; | |
/** | |
* An input stream capable of reading individual bits from an underlying input stream. | |
* | |
* EN 605.421 Foundations of Algorithms | |
* Johns Hopkins Engineering for Professionals | |
* Summer 2017 | |
* |
require 'parallel' | |
require 'thread' | |
# The asset preloader is designed to precompute and cache all precompilable | |
# assets in parallel to avoid doing it in serial on the first request. As of | |
# Sprockets 3, all assets on the precompile list (i.e. config.assets.precompile) | |
# are compiled on the first request whether the current page has asked for them | |
# or not. Obviously such behavior can mean a very slow initial request (we were | |
# seeing load times on the order of 10-11 minutes). By preloading, or warming the | |
# sprockets cache, initial page load times can be reduced to ~15 seconds (with |
#! /usr/bin/env ruby | |
ENV['TXGH_CONFIG'] = "file://#{File.expand_path('../../config/txgh-config.yml', __FILE__)}" | |
require 'bundler' | |
Bundler.setup | |
require 'txgh' | |
config = begin |
#! /usr/bin/env ruby | |
ENV['TXGH_CONFIG'] = "file://#{File.expand_path('../../config/txgh-config.yml', __FILE__)}" | |
require 'bundler' | |
Bundler.setup | |
require 'txgh' | |
config = begin |
require 'digest/md5' | |
# The AssetFingerprinter calculates a digest hash of all the app's assets. It is | |
# used to avoid precompiling assets if none of them have changed since the last | |
# precompilation. This is done by generating a list of all assets from the list | |
# of configured asset paths and throwing all their contents through a digest | |
# algorithm. The result is a unique asset "fingerprint" that can be compared to | |
# other fingerprints to determine if any assets have changed. | |
# | |
# The fingerprinter also allows adding any additional files that should be used |
# name: human-readable name | |
# point_value: number of points earned | |
# priority: how likely the score is to actually happen | |
ScoreType = Struct.new(:name, :point_value, :priority) | |
SCORE_TYPES = [ | |
ScoreType.new('safety', 2, 5), | |
ScoreType.new('field goal', 3, 2), | |
ScoreType.new('touchdown', 6, 3), | |
ScoreType.new('touchdown with extra point', 7, 1), |