Skip to content

Instantly share code, notes, and snippets.

View Rizary's full-sized avatar

Andika Demas Riyandi Rizary

View GitHub Profile

Videos

accumResult st = TR.mapAccumL (renderTableQueue st) 1 (state.queuelist)
getTheResult { value } = value
eval (HandleSearchBox st str next) = do
let packages = _.name <$>
Arr.filter (packageContained str) st.package
_ <- H.subscribe
(H.eventSource
(\k -> J.select "#search" >>= Misc.autocomplete { source: packages
, select: k
})
(\a -> Just $ SearchBoxChange (a.item.value) H.Listening))
pure next
FROM haskell:8 as builder
WORKDIR /opt/server/hmb
RUN cabal update
RUN apt-get update && \
apt-get install -y postgresql-9.4 libpq-dev
ADD hackage-matrix-builder /opt/server/hmb
{ nixpkgs ? import <nixpkgs> {}
}:
let
inherit (nixpkgs) pkgs;
activate = pkgs.writeScriptBin "activate" ''
#!${pkgs.bash}/bin/bash -e
'';
frontend = import ./frontend {};
let
nginxCfg = {
enable = true;
config = ''
events {
worker_connections 1024;
}
http {
server {
listen 0.0.0.0:80;
{
"name": "arda-tryout",
"version": "0.1.0",
"private": true,
"main": "index.js",
"scripts": {
"start": "webpack-dev-server",
"eject": "react-scripts eject",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
@Rizary
Rizary / default.nix
Last active June 16, 2018 10:39
setup for using cabal-install as buildinputs
{ nixpkgs ? import <nixpkgs> {}
, compiler ? "ghc822"
}:
let
inherit (nixpkgs) pkgs;
newCabal = import ./nixdeps/cabal.nix;
haskellPackages = pkgs.haskell.packages.${compiler};
{ mkDerivation, aeson, base, bytestring, servant, servant-auth
, stdenv, text
}:
mkDerivation {
pname = "auth-api";
version = "0.0.1.0";
src = ./.;
libraryHaskellDepends = [
aeson base bytestring servant servant-auth text
];
main :: IO ()
main = mainWidgetWithHead headElement bodyElement
headElement :: MonadWidget t m => m ()
headElement = do
el "title" $ text "Rizilab - Home"
styleSheet "index.css"
where
styleSheet link = elAttr "link" (Map.fromList [
("rel", "stylesheet")