Skip to content

Instantly share code, notes, and snippets.

View lorenzo's full-sized avatar

José Lorenzo Rodríguez lorenzo

View GitHub Profile
<?php
/**
* Configuration options
*
*/
$iterations = 1000000;
info();
/**
* Actual Benchmarks to run
FROM fpco/stack-build:latest as haskell-build
ADD .
RUN stack install
FROM ubuntu:16
COPY --from=haskell-build /path/to/install/folder/my-binary /usr/local/bin
CMD ["my-binary"]
import qualified Control.Distributed.Process as Process
data Config = Config
{ uiPort :: Int
, dbType :: DbBackend
, folder :: String
, testsList :: Scheduler.RunSchedule
}
newtype App a = App
share
[mkPersist sqlSettings, mkMigrate "migrateAll"]
[persistLowerCase|
Run
match Text
groupName Text
concurrency Int
created UTCTime
deriving Eq Show Generic

Keybase proof

I hereby claim:

  • I am lorenzo on github.
  • I am joselorenzo (https://keybase.io/joselorenzo) on keybase.
  • I have a public key whose fingerprint is F06B 66D2 BC5F 2312 47D5 674E DFC6 2718 69B3 3267

To claim this, I am signing this object:

• Couldn't match type ‘Element
(f0 User)’
with ‘User’
Expected type: [User]
Actual type: [Element (f0 User)]
The type variable ‘f0’ is ambiguous
• In the second argument of ‘(.~)’, namely
‘(toList makeRows :: [User])’
port module Main exposing (..)
port requestAddOne : Int -> Cmd Msg
port receiveAddOne : (Int -> Msg) -> Sub Msg
subscriptions model = Sub.batch [ receiveAddOnce GetAddOneResult]
update msg model =
(model, requestAddOne 1)
@lorenzo
lorenzo / Main.hs
Last active October 27, 2016 10:33
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Resource
import qualified Conduit as C
import Data.Conduit (($$), (=$), (.|), (=$=))
import qualified Data.Conduit.Combinators as CC
def is_mate?(conn) do
current_user(conn)
|> Maybe.and_then(fn (user) -> Tripmate.Repo.get_by(Tripmate.Mate, user_id: user.id) end)
|> Maybe.map(fn _ -> true end)
|> Maybe.with_default(false)
end
@lorenzo
lorenzo / Counter.elm
Last active September 21, 2016 15:07 — forked from hipertracker/Counter.elm
Elm example
module Main exposing (..)
{- This file re-implements the Elm Counter example (1 counter) with elm-mdl
buttons. Use this as a starting point for using elm-mdl components in your own
app.
-}
import Html.App as App
import Html exposing (..)
import Html.Attributes exposing (href, class, style)