Skip to content

Instantly share code, notes, and snippets.

View BernardNotarianni's full-sized avatar
🏠
Working from home

Bernard Notarianni BernardNotarianni

🏠
Working from home
  • Paris, France
View GitHub Profile
@BernardNotarianni
BernardNotarianni / user.el
Created September 21, 2015 19:54
flycheck erlang otp
;; 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)))
@BernardNotarianni
BernardNotarianni / gist:6496653
Created September 9, 2013 14:49
Simple and efficient automatic test runner. Scan when a source file is modified, and then run the test suite, displaying result to the console.
#!/bin/bash
function ctrl_c {
echo "** Trapped CTRL-C"
stop_server
exit
}
# hit ctrl-c to exit the loop
trap ctrl_c INT TERM EXIT
@BernardNotarianni
BernardNotarianni / cliptem.sh
Created December 28, 2015 11:31
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/todo.org"
@BernardNotarianni
BernardNotarianni / 0_reuse_code.js
Created December 21, 2013 13:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
;;; packages.el --- Erlang Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
%% 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
@BernardNotarianni
BernardNotarianni / spacemacssheet.tex
Last active August 22, 2017 13:25
Spacemacs Cheat Sheet
\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

Keybase proof

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:

@BernardNotarianni
BernardNotarianni / Spec.hs
Created April 11, 2018 08:00
premier increment de refactoring
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Test.Hspec
main :: IO ()
main = hspec spec
newtype Montant = Montant Int
deriving (Eq, Ord, Enum, Num)
instance Show Montant where
@BernardNotarianni
BernardNotarianni / README.md
Last active December 23, 2018 14:39
Haskell Recipes

Haskell recipes

Read and print to console

main :: IO ()
main = do
  putStrLn("Hello! what is your name?")
  name <- getLine
  putStrLn("Hello " ++ name ++ "!")