Skip to content

Instantly share code, notes, and snippets.

jhuckabee / gist:0f89371b2a55ec0ba98c
Last active Aug 29, 2015
Yosemite Upgrade Notes
View gist:0f89371b2a55ec0ba98c

For those of you using Homebrew and Homebrew installed PostgreSQL, here's a few notes on my Yosemite upgrade from over the weekend:

Slow Installer

The installation process went smoothly right up until the end. With "3 minutes remaining" it appeared to stall. Be patient. In the background the installer is doing some weird copying routine of /usr/local. This took 4 hours on my machine. Hit Cmd-L to see the log of what's going on.


During the above mentioned copying routine of /usr/local, it seems to be skipping empty directories. Unfortunately PostgreSQL requires a few of these empty directories to be present to run properly. To fix this simply run:

View gist:810552e99959eacbbea9
<polymer-element name="rails-ajax" extends="core-ajax">
ready: function() {
this.csrfParam = document.querySelector("meta[name=csrf-param]").content;
this.csrfToken = document.querySelector("meta[name=csrf-token]").content;
getParams: function(params) {
jhuckabee / anonymous-class-memory-profiling-sm.rb
Last active Dec 19, 2015
More state_machine gem memory profiling...
View anonymous-class-memory-profiling-sm.rb
class HM < Module ; end
class Machine
def initialize(owner_class)
@helpers = helpers = {
:instance =>,
:class =>
owner_class.class_eval do
jhuckabee / gist:5978668
Last active Dec 19, 2015
Trying to track down state machine memory leak on anonymous classes.
View gist:5978668
require 'state_machine'
# Without state machine
regular_class =
regular_class_id = regular_class.object_id
regular_class = nil
# With state machine
machine_class =
machine_class.state_machine(:initial => :parked) do
jhuckabee / tmux_iterm2.rb
Created Mar 14, 2012
Brew script for 'Tmux for iTerm2'
View tmux_iterm2.rb
require 'formula'
class TmuxIterm2 < Formula
url ''
md5 '59305a26bdd0245054fe719e6b2a960e'
homepage ''
depends_on 'libevent'
def install
View Sample JS Template
<h2><%= users.length %> Users</h2>
<% for(var i=0; i < users.length; i++) { %>
<li><a href="<%=users[i].url%>"><%=users[i].name%></a></li>
<% } %>
View gist:478672
<div id="event_type" ex:role="facet" ex:expression=".tid" ex:facetLabel="Event Type" ex:collapsible="true"></div>
<div id="event_tags" ex:role="facet" ex:expression=".tid_1" ex:facetLabel="Tags" ex:collapsible="true"></div>
View gist:298675
%meta{:name => 'csrf-token', :content => form_authenticity_token}
%meta{:name => 'csrf-param', :content => 'authenticity_token'}
View gist:298672
<meta name="csrf-token" content="<%= form_authenticity_token %>" />
<meta name="csrf-param" content="authenticity_token" />
View gist:298670
= javascript_include_tag ""
= javascript_include_tag 'rails'