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 / constit.md
Last active August 29, 2015 14:19
Kata Citoyen #mixit15

##Kata citoyen #mixit15

La démocratie est le gouvernement du peuple par le peuple. Cela signifie que le peuple est impliqué directement dans les prises de décisions qui le concernent. La plupart des pays occidentaux n’ont pas mis en place ce type de gouvernement, mais une version simplifiée qui passe par l’élection de représentants.

Je vous propose de nous exercer à devenir citoyen d’une démocratie en faisant un Kata citoyen.

L'atelier dur entre 30 minutes et une heure et il s'agit de nous exercer à écrire une constitution démocratique en commencant par un ou deux articles.

Pour les participants, cela permet de :

  • Sentir l’enthousiasme d’être un citoyen d’une démocratie, réellement impliqué et concerné par son pays ;
@BernardNotarianni
BernardNotarianni / fizzbuzz.rkt
Last active August 29, 2015 14:17
Tentative de Kata FizzBuzz avec que des monoïdes
#lang racket
(require racket/match)
; notre monoid est l'ensemble des entiers
; union "fizz" union "buzz" union "fizzbuzz"
(define (plus x y)
(match (cons x y)
[(cons a 0) a]
[(cons 0 a) a]
@BernardNotarianni
BernardNotarianni / user.el
Created March 23, 2015 19:58
User file for ohai-emacs
;;;
;;; user.el file for ohai-emacs
;;;
;;; https://github.com/BernardNotarianni/ohai-emacs
;;;
;;;
;;; backup files in /tmp
;;;
(setq backup-directory-alist
@BernardNotarianni
BernardNotarianni / erlang-startups.md
Last active August 29, 2015 14:07
Pourquoi un Meetup Erlang Startups?

Plusieures personnes m’ont demandé pourquoi j’avais restreint le Meetup Erlang-startupers aux personnes qui seraient justement intéressées uniquement aux startups.

Mon intention est de monter une startup, ou bien d’en rejoindre une.

J’ai retenu Erlang comme technologie serveur car c’est à mon sens la meilleure technologie actuellement disponible pour une startup. En effet, Erlang offre une palette de caractéristiques qui le rend tout à fait idéal pour un contexte de startup :

  • Langage fonctionnel, permettant de réduire la complexité du code
  • Facile et rapide à mettre en œuvre
  • Conçu pour la fiabilité et la résilience
  • Scalable jusqu’à des échelles défiant l’imagination
  • Performant
@BernardNotarianni
BernardNotarianni / circus.sh
Last active August 29, 2015 13:58
Continuous build for erlang (cowboy, erlydtl...)
#!/bin/bash
# the name of your erlang app
APPNAME=yourappname
# we will monitor for any modification in those directories
WATCHEDDIRS="src templates"
# --- Functions
@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
@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 / gist:4283607
Created December 14, 2012 08:19
Documenting our understanding of EmberJS Data

Documenting our understanding of EmberJS Data

EmberJS Data is moving fast those days. Lot of refactoring is going on and the documentation is not following as fast as the code.

To help me to understand (sometime to reverse engineer) ember data I use dedicated Unit Tests written with QUnit. Each time I am exploring a new concept, I write a new small Qunit test to play with it on a toy case. When my understanding is fine, I put it on real code.

@BernardNotarianni
BernardNotarianni / gist:1362292
Created November 13, 2011 16:25
Install Erlang
sudo apt-get install curl
sudo apt-get install build-essential libncurses5-dev openssl libssl-dev
curl -O https://raw.github.com/spawngrid/kerl/master/kerl; chmod a+x kerl
sudo apt-get install libwxbase2.8-dev libwxgtk2.8-dev libgl1-mesa-dev libglu1-mesa-dev libglut3-dev
./kerl build R14B04 r14b04
sudo ./kerl install r14b04 /opt/erlang/r14b04
@BernardNotarianni
BernardNotarianni / gist:979369
Created May 18, 2011 19:40
Moving lines in Emacs
(defun move-text-internal (arg)
(cond
((and mark-active transient-mark-mode)
(if (> (point) (mark))
(exchange-point-and-mark))
(let ((column (current-column))
(text (delete-and-extract-region (point) (mark))))
(forward-line arg)
(move-to-column column t)
(set-mark (point))