$ rails g model User
belongs_to
has_one
-- | |
-- how to populate locations table on db2 from wineries table on db1 | |
-- | |
-- SELECT "INSERT INTO locations( name, website, address, address2, city, state, zip, country, phone, created_at, updated_at, latitude, longitude, email, fax, winery_id ) VALUES (" || name ||", " || website || ", " || address || ", null , null, null, null, null, " || phone || ", " || created_at || ", " || modified_at || ",null, null, " || email || ", " || fax || ", " || winery_id || "); " FROM wineries | |
SELECT 'INSERT INTO locations( name, winery_id ) VALUES ("' || name || '", "' || winery_id || '"); ' FROM wineries |
d3 = require 'd3' | |
module.exports = class SearchIcon | |
# Construct an instance of a search icon. | |
# The animation will take {duration} milliseconds, and occupy | |
# a grid {width}x{height} pixels. | |
constructor: (duration, width, height) -> | |
if width != height | |
throw new ArgumentError("search icon was not rendered in a square") |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# Dependencies | |
# nginx_lua | |
# lua uuid module (luarocks install uuid) | |
http { | |
# this will be the request id | |
map $host $request_uuid { | |
default ''; | |
} |
% Typeclassopedia % Brent Yorgey
Originally published 12 March 2009 in issue 13 of the Monad.Reader. Ported to the Haskell wiki in November 2011 by Geheimdienst. Converted to Markdown in August 2013 by Erlend Hamberg. Converted to EPUB format with pandoc.
This is not the official version of the Typeclassopedia. The official version is now the Haskell wiki version which supersedes the version published in the Monad.Reader. Please help update and extend it by editing it yourself or by leaving comments, suggestions, and questions on the talk page.
The standard Haskell libraries feature a number of type classes with algebraic or category-theoretic underpinnings. Becoming a fluent Haskell hacker requires intimate familiarity with them all, yet acquiring this f