Skip to content

Instantly share code, notes, and snippets.

Working from home

Bernard Notarianni BernardNotarianni

Working from home
Block or report user

Report or block BernardNotarianni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Haskell recipes

Read and print to console

main :: IO ()
main = do
  putStrLn("Hello! what is your name?")
  name <- getLine
  putStrLn("Hello " ++ name ++ "!")
BernardNotarianni / Spec.hs
Created Apr 11, 2018
premier increment de refactoring
View Spec.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Test.Hspec
main :: IO ()
main = hspec spec
newtype Montant = Montant Int
deriving (Eq, Ord, Enum, Num)
instance Show Montant where

Keybase proof

I hereby claim:

  • I am bernardnotarianni on github.
  • I am notarianni ( on keybase.
  • I have a public key ASApPPTxeZfWEJkur9nA_AsLr5sUnASAcosFzh0DfqotZAo

To claim this, I am signing this object:

View rest_change_handler.erl
%% Copyright 2016, Bernard Notarianni
%% Licensed under the Apache License, Version 2.0 (the "License"); you may not
%% use this file except in compliance with the License. You may obtain a copy of
%% the License at
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
View packages.el
;;; packages.el --- Erlang Layer packages File for Spacemacs
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;; Author: Sylvain Benner <>
;; URL:
;; This file is not part of GNU Emacs.
;;; License: GPLv3
BernardNotarianni /
Created Dec 28, 2015
Create i3 projet layout
#!/usr/bin/env bash
# Load i3 windows layout
i3-msg "workspace 2; append_layout ~/.i3/cliptem.json"
# PDF reader for phoenix book
i3-msg "workspace 2; exec evince"
# Backlog
i3-msg "workspace 2; exec emacsclient -c ~/cliptem/cliptem/"
BernardNotarianni / user.el
Created Sep 21, 2015
flycheck erlang otp
View user.el
;; customize flycheck for otp standard directory structure
(require 'flycheck)
(flycheck-define-checker erlang-otp
"An Erlang syntax checker using the Erlang interpreter."
:command ("erlc" "-o" temporary-directory "-Wall"
"-I" "../include" "-I" "../../include"
"-I" "../../../include" source)
((warning line-start (file-name) ":" line ": Warning:" (message) line-end)
(error line-start (file-name) ":" line ": " (message) line-end)))
BernardNotarianni / spacemacssheet.tex
Last active Aug 22, 2017
Spacemacs Cheat Sheet
View spacemacssheet.tex
% based on latex cheat sheet
% To make this come out properly in landscape mode, do one of the following
BernardNotarianni / chain.erl
Created Jun 17, 2015
Broadcast over process
View chain.erl
-module (chain).
-export ([new/1]).
-export ([send/2]).
-export ([stop/1]).
%% Create a chain of N processes
new (N) ->
[spawn (fun () -> child_reply () end) || _ <- lists: seq (1,N)].
%% Send a message to all processes on chain
BernardNotarianni / vat.hs
Last active Aug 29, 2015
carpaccio haskell comment
View vat.hs
-- vat processing input from a list
-- maybe more adapted if data would come from an external sources?
vat :: String -> Double
vat c =
case c `lookup` vatRates of
Just x -> x
Nothing -> 0
vatRates:: [(String, Double)]
You can’t perform that action at this time.