Skip to content

Instantly share code, notes, and snippets.

View thetamind's full-sized avatar

Matthew Boehlig thetamind

View GitHub Profile
defmodule Bug.Default do
defmacro __using__(_) do
quote do
@impl Bug.Server
def one(), do: "Fallback"
def two(), do: "Fallback"
defoverridable Bug.Server
end
end
@thetamind
thetamind / conway.exs
Created October 24, 2016 15:17
Conway's Game of Life in Elixir
defmodule ConwayTest do
use ExUnit.Case
# The Rules
# For a space that is 'populated':
# Each cell with one or no neighbors dies, as if by solitude.
# Each cell with four or more neighbors dies, as if by overpopulation.
# Each cell with two or three neighbors survives.
# For a space that is 'empty' or 'unpopulated'
@thetamind
thetamind / webpack-dev-hot-middleware.patch
Created June 22, 2016 17:19
webpack-dev-hot-middleware
From af112ef6f3f843df98ca68bfd54f63d07d4768e9 Mon Sep 17 00:00:00 2001
From: Matthew Boehlig <matthew@boldcommerce.com>
Date: Mon, 6 Jun 2016 13:05:18 -0500
Subject: [PATCH 1/1] Try dev-hot-middleware
Adopt example from https://github.com/glenjamin/byte-board
---
package.json | 4 ++++
server.js | 28 ++++++++++++++++++++++++++++
webpack.config.js | 2 ++
@thetamind
thetamind / bundler_env
Last active August 29, 2015 13:57
Bundler issue #2915: 'builtin_gem?': undefined method 'include?' for nil:NilClass
Bundler 1.6.0.rc2
Ruby 2.1.1 (2014-02-24 patchlevel 76) [x86_64-darwin12.0]
Rubygems 2.2.2
GEM_HOME /Users/thetamind/.gem/ruby/2.1.1
GEM_PATH /Users/thetamind/.gem/ruby/2.1.1:/Users/thetamind/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0
Bundler settings
jobs
Set for your local app (/private/tmp/repro-2915/.bundle/config): "4"
path
@thetamind
thetamind / 0-readme.md
Created September 19, 2012 18:59 — forked from burke/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p194 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

source :rubygems
gem 'rails', '~>3.1.0.rc1'
gem 'rake', '~>0.9.0'
gem 'compass', '>=0.11.1'
gem 'html5-boilerplate', '~>1.0.0'
gem 'grid-coordinates'
gem 'rails3-generators', '~>0.17.0'
gem 'coffee-script'
add_index :attachments, :parent_id
add_index :attachments, :asset_id
add_index :domain_names, :user_id
add_index :domain_names, :event_id
add_index :event_memberships, :user_id
add_index :event_memberships, :event_id
remove_index :attachments, :parent_id
remove_index :attachments, :asset_id
remove_index:domain_names, :user_id
remove_index:domain_names, :event_id