Tried to run postgres -D /usr/local/var/postgres
and got this:
FATAL: could not open directory "pg_tblspc": No such file or directory
An easy fix. The Yosemite install blows away some empty directories that PostgreSQL expects.
var Sankey = function(opts) { | |
this.opts = opts; | |
this.el = $("#" + this.opts.el); | |
this.graphsReady = 0; | |
this.graphWidth = this.el.width(); | |
}; | |
Sankey.prototype.initPaper = function() { | |
this.paper = Raphael(document.getElementById(this.opts.el)); | |
}; |
Working Man | |
In The End | |
Bastille Day | |
2112 Overture | |
Closer To The Heart | |
The Trees | |
The Spirit Of Radio | |
Limelight | |
Subdivisions | |
Distant Early Warning |
The MIT License (MIT) | |
Copyright (c) 2014 NPR | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
initdb /usr/local/var/postgres9.4 -E utf8 | |
pg_upgrade -v \ | |
-d /usr/local/var/postgres \ | |
-D /usr/local/var/postgres9.4 \ | |
-b /usr/local/Cellar/postgresql/9.3.5_1/bin/ \ | |
-B /usr/local/Cellar/postgresql/9.4.1/bin/ | |
mv /usr/local/var/postgres /usr/local/var/postgres9.3 | |
mv /usr/local/var/postgres9.4 /usr/local/var/postgres | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |
# encoding: UTF-8 | |
require 'rubygems' | |
require 'rest-client' | |
require 'nokogiri' | |
class ArticleFetcher | |
def self.fetch_text(url) | |
case url | |
when /video\.nytimes\.com/ |
Based on: http://coderwall.com/p/1mni7w
brew install postgresql
initdb /usr/local/var/postgres -E utf8
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
// Types | |
var one = 1; | |
var two = 2; | |
three; | |
window.three; | |
window.one = 1; | |
one = 1; | |
var one = []; | |
var one = {one: 1}; | |
one.two = 1; |
require 'sinatra' | |
require 'sanitize' | |
TO_REMOVE = ["", " ", " "] | |
get '/' do | |
<<-HTML | |
<form method="post" action="sanitize"> | |
<textarea name="dirty" style="width:100%;height:800px;"></textarea> | |
<input type="submit" value="Submit"> |
function commaify (num) { | |
var num_string, | |
i, | |
len, | |
threes = [], | |
remainders; | |
num_string = num.toString(); | |
len = num_string.length; | |
remainders = len % 3; |