- why is it that the haskell Text.CSV version is always around twice as slow?
- how can I use
;
as a column separator in the haskell Text.CSV version?
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
create function es.project(event es.events) returns void | |
language plpgsql as $$ | |
begin | |
case event.type | |
when 'user_registered' then | |
insert into es.active_users | |
(user_id , name , sha256 , updated_at) values | |
(event.aggregate_id , event.payload->>'name' , event.payload->>'sha256' , event.added_at); | |
when 'user_changed_password' then | |
update es.active_users set |
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
root@a77d04db26a6:/go/src/github.com/docker/docker# GOOS=darwin hack/make.sh binary | |
Removing bundles/ | |
---> Making bundle: binary (in bundles/binary) | |
Building: bundles/binary-daemon/dockerd-dev | |
GOOS="darwin" GOARCH="" GOARM="" | |
# github.com/docker/docker/vendor/github.com/moby/buildkit/snapshot | |
vendor/github.com/moby/buildkit/snapshot/localmounter_unix.go:17:38: undefined: syscall.MNT_DETACH | |
# github.com/docker/docker/vendor/github.com/docker/libnetwork/osl |
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
<script type="module"> | |
export default class RemoteContent extends HTMLElement { | |
constructor() { | |
super(); | |
this.parser = new DOMParser(); | |
this.shadow = this.attachShadow({mode: 'open'}); | |
this.append = this.shadow.appendChild.bind(this.shadow); | |
this.shadow.innerHTML = 'loading…'; | |
} |
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
FROM alpine:edge as build | |
RUN apk add --no-cache ghc musl-dev | |
RUN wget https://github.com/commercialhaskell/stack/releases/download/v1.9.0.1/stack-1.9.0.1-linux-x86_64-static.tar.gz -O - \ | |
| tar -Oxzf - stack-1.9.0.1-linux-x86_64-static/stack > /usr/bin/stack | |
RUN chmod +x /usr/bin/stack | |
WORKDIR /usr/src/app |
export TRELLO_TOKEN='<your trello token>' # found in web cookie
export TRELLO_DONE_ID='<the trello internal id of the "Done" list>'
curl -H "Cookie: token=$TRELLO_TOKEN;" -sL trello.com/b/2NFnHkvl.json \
| ./plot.sh 2018-06-01 2018-11-01 true | ./burndown.r "$(date --iso -d '+2 year')" && xdg-open burndown.svg
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
<?php | |
$num = floatval($argv[1] ?? '1e6'); | |
echo "iterations: $num\n"; | |
function noop() { | |
} | |
$start = microtime(true); | |
printf("starting raw at:\t\t%.3F s\n", $start); |
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
const puppeteer = require('puppeteer'); | |
async function visit(breadcrumb, allowed, denied, visited, browser, url) { | |
if (visited.has(url)) { | |
console.log(`already visited ${url}`); | |
return; | |
} | |
if (denied.some(regex => regex.test(url))) { | |
console.log(`denied ${url}`); | |
return; |
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
<?php | |
public function process(ContainerBuilder $container) | |
{ | |
$factory = $container->findDefinition('app.doctrine.repository.factory'); | |
$repositories = []; | |
foreach ($container->findTaggedServiceIds('app.repository') as $id => $params) { | |
foreach ($params as $param) { | |
$repositories[$param['class']] = $id; |
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
<?php | |
namespace PhpSpec\Iterator; | |
use PhpSpec\Wrapper\Collaborator as Base; | |
use Prophecy\Prophecy\ObjectProphecy; | |
use Prophecy\Promise\ReturnPromise; | |
class Collaborator extends Base | |
{ |