Skip to content

Instantly share code, notes, and snippets.

---
title: "Codebook template"
author: "Your name here"
date: "The date here"
output:
html_document:
keep_md: yes
---
## Project Description
@veve90
veve90 / patternMatching.sc
Created August 17, 2016 08:53
LearningScala|week4.6 |Functional Programming Principles in Scala
trait Expr
case class Number(n:Int) extends Expr
case class Sum(n:Expr,m:Expr) extends Expr
case class Var(n:String) extends Expr
case class Prod(n:Expr,m:Expr) extends Expr
def eval(e:Expr):Int = e match {
case Number(n) => n
case Sum(x,y) => eval(x) + eval(y)
case Prod(x,y) => eval(x) * eval(y)
@veve90
veve90 / lists.sc
Created August 17, 2016 09:24
LearningScala|week4.7 |Functional Programming Principles in Scala
// sorting a list with a custom method of sorting
val x = 7::2::5::Nil;
val y = 1::2::List(3,4,Nil)::5::Nil;
x.size
y.size
def insert(x:Int, xs:List[Int]):List[Int] = xs match {
case List()=> List(x)
GET _cat/
GET /_cluster/health?h=status
PUT /index-2016.06.06
{
"settings": {
"number_of_shards" : 1,
"number_of_replicas" : 0
# install using steps https://docs.docker.com/engine/installation/linux/docker-ce/fedora/#install-using-the-repository
# erron while "sudo docker run hello-world"
# The error: Service lacks both ExecStart= and ExecStop= setting
# Solved with post https://success.docker.com/KBase/Using_systemd_to_control_the_Docker_daemon
#Solution:
sudo systemctl edit docker
[Service]
ExecStart=
#create an aliast for squash all commits and use it
git config --global alias.squash-all '!f(){ git reset $(git commit-tree HEAD^{tree} -m "${1:-A new start}");};f'
git squash-all "First commint - one commit"
#add tag
git tag {TAG_NAME}
git push origin {BRANCH_NAME} --tags
# Liste des tags en local:
@veve90
veve90 / docker helper
Last active September 13, 2018 13:39
#start docker daemon (on viperr)
systemctl restart docker
#start bash in docker
docker exec -ti container_name bash
#docker informations
docker -D info
@veve90
veve90 / rpi3_iot_server.md
Created October 13, 2018 05:26 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@veve90
veve90 / MQTT
Created October 14, 2018 13:13
#Queue
https://www.rabbitmq.com/mqtt.html
#Boket MQTT
Mosquitto MQTT Broker
# Check elements in queue
MQTT Lens (chrome plugin)
@veve90
veve90 / TICK-rasbperryPI
Last active October 14, 2018 16:14
TICK-rasbperryPI
### SOURCES #######################################################################"""
# https://www.influxdata.com/blog/running-the-tick-stack-on-a-raspberry-pi/
# https://makemypi.wordpress.com/2018/02/19/iot-with-influxdb-telegraph-and-grafana-on-the-raspberry-pi-3/
# https://thingsmatic.com/2017/03/02/influxdb-and-grafana-for-sensor-time-series/
# https://github.com/opendata-stuttgart/mqtt-stack/blob/master/howto_setup_tick_stack.md
# https://gist.github.com/fragolinux/c9b0025f831d1c9edcdf049d920d34ad
## https://bentek.fr/influxdb-grafana-raspberry-pi/
## http://ticksurraspberrypi3.blogspot.com/
## https://www.influxdata.com/integration/mqtt-monitoring/
## https://github.com/fg2it/grafana-on-raspberry