main :: IO ()
main = do
putStrLn("Hello! what is your name?")
name <- getLine
putStrLn("Hello " ++ name ++ "!")
This file contains hidden or 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
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Test.Hspec | |
main :: IO () | |
main = hspec spec | |
newtype Montant = Montant Int | |
deriving (Eq, Ord, Enum, Num) | |
instance Show Montant where |
I hereby claim:
- I am bernardnotarianni on github.
- I am notarianni (https://keybase.io/notarianni) on keybase.
- I have a public key ASApPPTxeZfWEJkur9nA_AsLr5sUnASAcosFzh0DfqotZAo
To claim this, I am signing this object:
This file contains hidden or 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
%% 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 | |
%% | |
%% http://www.apache.org/licenses/LICENSE-2.0 | |
%% | |
%% Unless required by applicable law or agreed to in writing, software | |
%% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
This file contains hidden or 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
;;; packages.el --- Erlang Layer packages File for Spacemacs | |
;; | |
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors | |
;; | |
;; Author: Sylvain Benner <[email protected]> | |
;; URL: https://github.com/syl20bnr/spacemacs | |
;; | |
;; This file is not part of GNU Emacs. | |
;; | |
;;; License: GPLv3 |
This file contains hidden or 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
#!/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/todo.org" |
This file contains hidden or 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
;; 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) | |
:error-patterns | |
((warning line-start (file-name) ":" line ": Warning:" (message) line-end) | |
(error line-start (file-name) ":" line ": " (message) line-end))) |
This file contains hidden or 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
\documentclass[10pt,landscape]{article} | |
\usepackage{multicol} | |
\usepackage{calc} | |
\usepackage{ifthen} | |
\usepackage[landscape]{geometry} | |
\usepackage{hyperref} | |
% based on latex cheat sheet https://wch.github.io/latexsheet/ | |
% | |
% To make this come out properly in landscape mode, do one of the following |
This file contains hidden or 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
-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 |
This file contains hidden or 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
-- 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)] |
NewerOlder