Skip to content

Instantly share code, notes, and snippets.

View manuelleduc's full-sized avatar

Manuel Leduc manuelleduc

View GitHub Profile
# Weather chart
## Configuration
```
commit
[#appid appid: "08555ce79878aaa57dd97d3a1b2019e5"]
```
## Display configuration
package fr.mleduc.testfuture
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.util.Failure
import scala.util.Success
object Test1 extends App {
def lift[A](a: A): Future[A] = Future { a }
@manuelleduc
manuelleduc / OA.scala
Created October 20, 2016 15:11
Object algebra examples for mleduc.xyz
object OA {
// based on http://lambda-the-ultimate.org/node/4572
// read : https://oleksandrmanzyuk.wordpress.com/2014/06/18/from-object-algebras-to-finally-tagless-interpreters-2/
def test(): Unit = {
val pa = new PrintExpAlg() {}
val pa2 = new PrintExpAlgBis() {}
// But calling ea with exp2 is an error
// val ev_bad = exp2(ea)
@manuelleduc
manuelleduc / Makefile
Created October 14, 2016 09:06
Makefile for building latex documents easily
MAIN = main #.pdf
BIBLI = main
PDFTEX_TEX = pdflatex -shell-escape -interaction=nonstopmode -file-line-error
BIBLI_BUILD = bibtex
FIGURES_SVG=$(wildcard figures/*.svg)
FIGURES_PDF=$(FIGURES_SVG:.svg=.pdf)
all : $(MAIN).pdf
$(MAIN).pdf : figures
add node1 : JavaNode
add node2 : JavascriptNode
add node1.ticker, node2.ticker : Ticker
add node1.console, node2.console : ConsolePrinter
add sync : WSGroup
add chanA, chanB : RemoteWSChan
attach node1, node2 sync
bind node1.ticker.tick chanA
package demo.kevoree.docker;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.CreateContainerResponse;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.*;
import com.github.dockerjava.core.DockerClientBuilder;
/**
* Created by mleduc on 01/07/16.
@manuelleduc
manuelleduc / 200nodes.kevs
Last active June 22, 2016 10:28
200 noeuds
add jsnode99, jsnode98, jsnode97, jsnode96, jsnode95, jsnode94, jsnode93, jsnode92, jsnode91, jsnode90, jsnode89, jsnode88, jsnode87, jsnode86, jsnode85, jsnode84, jsnode83, jsnode82, jsnode81, jsnode80, jsnode79, jsnode78, jsnode77, jsnode76, jsnode75, jsnode74, jsnode73, jsnode72, jsnode71, jsnode70, jsnode69, jsnode68, jsnode67, jsnode66, jsnode65, jsnode64, jsnode63, jsnode62, jsnode61, jsnode60, jsnode59, jsnode58, jsnode57, jsnode56, jsnode55, jsnode54, jsnode53, jsnode52, jsnode51, jsnode50, jsnode49, jsnode48, jsnode47, jsnode46, jsnode45, jsnode44, jsnode43, jsnode42, jsnode41, jsnode40, jsnode39, jsnode38, jsnode37, jsnode36, jsnode35, jsnode34, jsnode33, jsnode32, jsnode31, jsnode30, jsnode29, jsnode28, jsnode27, jsnode26, jsnode25, jsnode24, jsnode23, jsnode22, jsnode21, jsnode20, jsnode19, jsnode18, jsnode17, jsnode16, jsnode15, jsnode14, jsnode13, jsnode12, jsnode11, jsnode10, jsnode9, jsnode8, jsnode7, jsnode6, jsnode5, jsnode4, jsnode3, jsnode2, jsnode1, jsnode0 : JavascriptNode/5.3.3
add java
$(function(){ // on dom ready
$('#cy').cytoscape({
layout: {
name: 'cose',
padding: 10
},
style: [
{
@manuelleduc
manuelleduc / xml
Last active May 10, 2016 14:03 — forked from barais/xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>org.kevoree.library.cloud.root</artifactId>
<groupId>org.kevoree.library.cloud</groupId>
<version>5.3.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>