Skip to content

Instantly share code, notes, and snippets.

View warpr's full-sized avatar
🎧
Programming

Kuno Woudt warpr

🎧
Programming
View GitHub Profile
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
}
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=#
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: "박 상수" }
@warpr
warpr / t.hs
Created September 1, 2013 19:40
{-# 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
@warpr
warpr / error.hs
Created September 16, 2013 17:05
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")