We want to get back this result
{
project: {
id: 1,
name: "First Project",
description: "Create a cool website",
client: {
id: 1,
name: "First Client"
We want to get back this result
{
project: {
id: 1,
name: "First Project",
description: "Create a cool website",
client: {
id: 1,
name: "First Client"
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
import Control.Monad.Logic | |
import Control.Monad.Trans.Maybe | |
zipLogic :: (MonadLogic m) => m a -> m b -> m (a, b) | |
zipLogic gx gy = | |
maybe mzero return <=< runMaybeT $ do | |
(x, rx) <- MaybeT (msplit gx) | |
(y, ry) <- MaybeT (msplit gy) | |
lift $ return (x, y) `mplus` zipLogic rx ry |
Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.
The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca
Useful but not complete: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Illumos
pkgin up
pkgin in build-essential ghc
-- returning updated values and old values by using a sub-expression | |
update orders | |
set type = 'delivery' | |
where id = 3767 | |
returning id, type, ( | |
select type from orders where id = 3767 | |
) as old_type; |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module PipeLog where | |
import Control.Applicative | |
import Data.Functor.Identity | |
import Pipes | |
import qualified Pipes.Prelude as P | |
newtype LogT l m a = |
#!/bin/sh | |
set -o xtrace | |
# A script to bootstrap cabal-install. | |
# It works by downloading and installing the Cabal, zlib and | |
# HTTP packages. It then installs cabal-install itself. | |
# It expects to be run inside the cabal-install directory. | |
# install settings, you can override these by setting environment vars |
This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)