Skip to content

Instantly share code, notes, and snippets.

View manuelleduc's full-sized avatar

Manuel Leduc manuelleduc

View GitHub Profile
<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/maven-v4_0_0.xsd">
<artifactId>import_properties</artifactId>
<groupId>com.nxp.id.nfc.tests</groupId>
<version>1.0</version>
<modelVersion>4.0.0</modelVersion>
<name>Import Properties file</name>
@manuelleduc
manuelleduc / Fibonacci.elm
Created April 29, 2016 08:28
Fibonacci in elm
module Fibonacci (fibonacci, main) where
import ElmTest exposing (assertEqual, suite, elementRunner, test)
import Graphics.Element exposing (Element)
--fibonacci : Int -> Int
fibonacci n = fibonacci' 1 1 n
fibonacci' na nb c =
if c <= 2 then
Hot spot Self time (microseconds) Percent
sun.misc.Unsafe.allocateMemory 40827769 37.1906102524
org.mwdb.Graph.saveDirtyList 25712173 23.421593396
org.mwdb.chunk.offheap.ArrayLongLongArrayMap.each 19401425 17.673041001
org.mwdb.Node.index 14272970 13.0014565433
java.lang.Object.notifyAll 5137291 4.6796332989
sun.misc.Unsafe.freeMemory 1749071 1.593254284
fr.mleduc.mwdb.test.mwdb.GameOfLifeService.doLife 452192 0.411908288
org.mwdb.manager.MWGResolver.getOrLoadAndMark 387226 0.3527298111
sun.misc.Unsafe.setMemory 370324 0.3373335328
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.mleduc.sir</groupId>
<artifactId>tuto-jaxb</artifactId>
<version>1.0-SNAPSHOT</version>
@manuelleduc
manuelleduc / Kevscript.g4
Created February 25, 2016 13:30
kevscript draft 0.0.1
grammar Kevscript;
script : (add|set|attach|bind|detach|unbind|define)+ ;
add : ADD identifier TYPE_DEF_SEPARATOR type ;
set : SET identifier ASSIGN_SEPARATOR assignable ;
attach : ATTACH identifier (identifier_list | identifier) ;
detach : DETACH identifier (identifier_list | identifier) ;
bind : BIND identifier (identifier_list | identifier) ;
unbind : UNBIND identifier (identifier_list | identifier) ;
define : 'let' ID '{' (ID ':' assignable)* '}' ;
@manuelleduc
manuelleduc / consoleandticker_0.0.1.kevs
Last active February 24, 2016 10:22
Premier poc advanced kevscript
// no clusure, group must be passed as a parameter.
// allowing json like datastructure as parameters ?
function configureChan(chan, uuid, host, path)
set {chan}.uuid = {uuid}
set {chan}.host = {host}
set {chan}.path = {path}
endfunction
export class MyClass {
public hello: string = "World";
}
@manuelleduc
manuelleduc / unions.ts
Created January 25, 2016 15:59
type unions
class A1 {
field1: boolean;
field2: number;
}
class A2 {
field1: string;
field3: boolean;
}
add node0 : JavascriptNode/5.3.3
add nodeDocker : JavaNode/5.3.1
add node0.comp722 : InstanceMonitor/1.0.0
add node0.comp464 : Ticker/5.3.2-SNAPSHOT
add node0.comp989 : KevScript/5.3.2-SNAPSHOT
add nodeDocker.redis, nodeDocker.master : DockerContainer/5.3.2-SNAPSHOT
add sync_dashboard : RemoteWSGroup/5.3.1
add chan931, chan191 : LocalChannel/5.0.2
attach nodeDocker, node0 sync_dashboard
add edison1, edison2, edison3, edison4, edison5 : JavascriptNode
add edisonGroup : RemoteWSGroup
attach edison1, edison2, edison3, edison4, edison5 edisonGroup
set edisonGroup.host = 'ws.kevoree.org'
set edisonGroup.path = '/edisons'