This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Exit( exitWith, ExitCode(..) ) | |
exit = exitWith ExitSuccess | |
die = exitWith $ ExitFailure 1 | |
readSomething :: String -> Either String String | |
readSomething s = Right (s ++ " -> 200 OK") | |
readSomethingElse :: String -> Either String String | |
readSomethingElse s = Left (s ++ " -> 404 NOT FOUND") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Monad.Exception.Synchronous | |
import Data.Conduit | |
import qualified Control.Exception as E | |
import Network.HTTP.Types.Status | |
import Network.HTTP.Conduit | |
import qualified Data.ByteString.Lazy as L | |
import qualified Network (withSocketsDo) | |
import Control.Exception as E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
var couchdb = require('couchdb-api'); | |
var server = couchdb.srv(); | |
var db = server.db("databank-test"); | |
var docs = [ | |
{ _id: "kuno", name: "Kuno" }, | |
{ _id: "warp", name: "Warp" }, | |
{ _id: "pak-sang-soo", name: "박 상수" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mb_test=# vacuum analyze; | |
ERROR: function musicbrainz_unaccent(character varying) does not exist | |
LINE 1: SELECT regexp_replace(upper(substr(musicbrainz_unaccent(txt)... | |
^ | |
HINT: No function matches the given name and argument types. You might need to add explicit type casts. | |
QUERY: SELECT regexp_replace(upper(substr(musicbrainz_unaccent(txt), 1, 6)), '[^A-Z ]', '_', 'g') | |
CONTEXT: PL/pgSQL function "page_index" line 8 at assignment | |
mb_test=# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request body: { | |
"artist.begin-date.day" : 13, | |
"artist.begin-date.month" : 11, | |
"artist.begin-date.year" : 1982, | |
"artist.ended" : 0, | |
"artist.name" : "倖田 來未", | |
"artist.sort-name" : "Koda Kumi", | |
"editor" : 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17:38 warp@bullet-bill:~/code/musicbrainz-data (master)$ psql -U root musicbrainz_nes --command='DROP SCHEMA musicbrainz CASCADE;' > /dev/null | |
NOTICE: drop cascades to 144 other objects | |
DETAIL: drop cascades to type musicbrainz.comment | |
drop cascades to type musicbrainz.cover_art_presence | |
drop cascades to type musicbrainz.ipi | |
drop cascades to type musicbrainz.isrc_t | |
drop cascades to type musicbrainz.iswc_t | |
drop cascades to type musicbrainz.label_code | |
drop cascades to type musicbrainz.locale | |
drop cascades to type musicbrainz.natural_integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:58 warp@bullet-bill:~/code/musicbrainz-data-service (master)$ cabal configure --enable-tests | |
Resolving dependencies... | |
Configuring musicbrainz-data-service-0.1.0.0... | |
Warning: This package indirectly depends on multiple versions of the same | |
package. This is highly likely to cause a compile failure. | |
package regex-base-0.93.2 requires mtl-2.0.1.0 | |
package snap-server-0.9.2.4 requires mtl-2.1.2 | |
package snap-core-0.9.2.2 requires mtl-2.1.2 | |
package snap-0.9.2.2 requires mtl-2.1.2 | |
package parsec-3.1.3 requires mtl-2.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:33 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal configure --enable-tests | |
Resolving dependencies... | |
Configuring musicbrainz-data-0.0.1... | |
Warning: This package indirectly depends on multiple versions of the same | |
package. This is highly likely to cause a compile failure. | |
package regex-base-0.93.2 requires mtl-2.0.1.0 | |
package parsec-3.1.3 requires mtl-2.1.2 | |
package musicbrainz-data-0.0.1 requires mtl-2.1.2 | |
package lens-3.3 requires mtl-2.1.2 | |
package comonads-fd-3.0 requires mtl-2.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:29 warp@bullet-bill:~/code/musicbrainz-data-service (master)$ cabal build | |
Building musicbrainz-data-service-0.1.0.0... | |
Preprocessing executable 'musicbrainz-data-service' for | |
musicbrainz-data-service-0.1.0.0... | |
[1 of 7] Compiling MusicBrainz.API.JSON ( src/MusicBrainz/API/JSON.hs, dist/build/musicbrainz-data-service/musicbrainz-data-service-tmp/MusicBrainz/API/JSON.o ) | |
src/MusicBrainz/API/JSON.hs:73:21: Not in scope: `dereference' | |
src/MusicBrainz/API/JSON.hs:78:21: Not in scope: `dereference' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:34 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal configure | |
Resolving dependencies... | |
Configuring musicbrainz-data-0.0.1... | |
14:36 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal install | |
Resolving dependencies... | |
In order, the following will be installed: | |
musicbrainz-data-0.0.1 (reinstall) | |
Warning: Note that reinstalls are always dangerous. Continuing anyway... | |
Configuring musicbrainz-data-0.0.1... | |
Building musicbrainz-data-0.0.1... |
NewerOlder