duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
Service Worker - offline support for the web
Progressive apps - high-res icon, splash screen, no URL bar, etc.
| (defdb db | |
| (if (System/getenv "DATABASE_URL") | |
| (let [db-uri (java.net.URI. (System/getenv "DATABASE_URL")) | |
| user-and-password (clojure.string/split (.getUserInfo db-uri) #":")] | |
| {:classname "org.postgresql.Driver" | |
| :subprotocol "postgresql" | |
| :user (get user-and-password 0) | |
| :password (get user-and-password 1) ; may be nil | |
| :subname (if (= -1 (.getPort db-uri)) | |
| (format "//%s%s" (.getHost db-uri) (.getPath db-uri)) |
| *.gem | |
| *.rbc | |
| .bundle | |
| .config | |
| .yardoc | |
| Gemfile.lock | |
| InstalledFiles | |
| _yardoc | |
| coverage | |
| doc/ |
| require 'versionable' | |
| class Subscription | |
| include Ripple::Document | |
| include Versionable | |
| current_schema_version 2 | |
| migrate_schema do |data| | |
| self.schema_version = 2 |
| require "overlord/searchable" | |
| module Overlord | |
| # Mark an ActiveRecord model as having a state machine. Requires a | |
| # string attribute called `state`. To set the default state for a | |
| # class, set a default column value for `state` in the database. | |
| # | |
| # Use Symbols for all keys and values in state definitions. |
| RSpec.configure do |config| | |
| config.around(:each, :max_retries => lambda { |m| !!m }) do |example| | |
| retries = example.metadata[:max_retries] | |
| begin | |
| example.run | |
| rescue => e | |
| retries -= 1 | |
| retry if retries >= 0 | |
| raise |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| def stub_model(model_name) | |
| stub_class model_name, ActiveRecord::Base | |
| end | |
| def stub_class(class_name, super_class = Object) | |
| stub_module class_name, Class.new(super_class) | |
| end | |
| def stub_module(module_name, object = Module.new) | |
| module_name = module_name.to_s.camelize |
| SiloRackApp = Rack::Builder.new do | |
| use Rack::Runtime # add X-Runtime header | |
| use E20::Ops::Middleware::RevisionMiddleware, logger: Silo.logger | |
| use E20::Ops::Middleware::TransactionIdMiddleware, logger: Silo.logger | |
| use E20::Ops::Middleware::HostnameMiddleware, logger: Silo.logger | |
| use Clogger, | |
| format: Clogger::Format::Combined, | |
| path: File.join(Silo::ROOT, 'log', 'silo.access.log'), | |
| reentrant: true |