Skip to content

Instantly share code, notes, and snippets.

View jeantil's full-sized avatar
✔️

Jean Helou jeantil

✔️
View GitHub Profile
@jeantil
jeantil / Mastermind.java
Created February 24, 2011 18:01
softeam dojo 6
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class Mastermind {
public int[] solve(String[] guess, String[] secret) {
int bonBienplace = 0;
int bonMalplace = 0;
Set<String> setSecret = new HashSet<String>(Arrays.asList(secret));
@jeantil
jeantil / Application.scala
Last active July 29, 2018 12:01
Playframework 2.2 configurable cors filter
/**
The MIT License (MIT)
Copyright (c) 2013 Jean Helou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@jeantil
jeantil / gist:530412fc7bf18199b0d03728fb563726
Last active March 7, 2018 13:38
Sujets Scala User Groups
Des sujets "scala basics" orientés syntaxe pour les débutants ( mais apportant des détails qui peuvent toujours intéresser les programmeurs expérimentés ) :
- Il était une fois un objet ( object oriented scala ) ✅ (livecoding)
- Pattern matching ✅ (livecoding)
- Il était une fois une fonction ( bases de programmation fonctionnelle) ✅ (livecoding)
- Gérer les erreurs en scala standard ✅ (livecoding)
- Les collections de la librairie standard ( et leurs petits défauts ) ✅ (livecoding)
Des sujets intermédiaires pour lesquels il vaudra mieux être familier avec la syntaxe :
- La monade et l'ingénieur 🔜
@jeantil
jeantil / genesis_public_key
Created February 21, 2018 15:03
genesis_public_key
04f468a898d8fb19e1ac76cb454d019182d41957b6f44e7d2b76df8e197ea46d3b21238aa60035d7535c5efcbfb04fe3660c5ee2845c09ed7740680b22a6b24f97
@jeantil
jeantil / ContentTypeTest.java
Created August 22, 2013 12:20
Test program for nio probeContentType and FileTypeDetector implementation
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.spi.FileTypeDetector;
import java.util.HashMap;
import java.util.Map;
import sun.nio.fs.DefaultFileTypeDetector;
import sun.nio.fs.GnomeFileTypeDetector;
@jeantil
jeantil / scala.txt
Created August 24, 2016 13:22
getting started with scala
Infos générales et saines lectures
- les 4 articles Strategic Scala Style du blog de lee haoyi
http://www.lihaoyi.com/post/StrategicScalaStylePrincipleofLeastPower.html
http://www.lihaoyi.com/post/StrategicScalaStyleConcisenessNames.html
http://www.lihaoyi.com/post/StrategicScalaStylePracticalTypeSafety.html
http://www.lihaoyi.com/post/StrategicScalaStyleDesigningDatatypes.html
Et la track de Daniel westheide
http://danielwestheide.com/scala/neophytes.html
Pour te familiariser avec le langage lui même tu peux pratiquer avec les workshops
@jeantil
jeantil / storj_synology_guide.md
Last active February 16, 2017 06:23
Installing dataserv-client on a Synology NAS using Debian Chroot.

History

  • 2016-03-28 revision by redd (BTC/SJCX: 1GhLgxeaa58eCXkWCSCuxLKR18vYXi7Tvi) (pointer to fix enable ssh after DSM 6 upgrade)
  • 2016-03-26 revision by skunk(BTC/SCJX: 18wfYoL4PvmTFUxz3KcH5p5ytbzCS5VT6Z)
  • 2016-02-15 revision by jean (BTC/SCJX: 1JSyKVJJHeAk5QsP7BDZTjGWKwMhaYUZta) (make sure the right pip is used within chroot)
  • 2016-02-01 revision by jean (BTC/SCJX: 1JSyKVJJHeAk5QsP7BDZTjGWKwMhaYUZta) (remove graphviz dependency as it is no longer needed)
  • 2015-12-09 revision by jean (BTC/SCJX: 1JSyKVJJHeAk5QsP7BDZTjGWKwMhaYUZta) (introduces history, drops source.list modification, drops python3, markdown)
  • ??? revision by reddd (BTC/SJCX: 1GhLgxeaa58eCXkWCSCuxLKR18vYXi7Tvi) (
@jeantil
jeantil / .gitconfig
Last active September 22, 2016 11:34
git changelog
[alias]
current-tag= describe --abbrev=0 --tags
previous-tag= "!sh -c 'git describe --abbrev=0 --tags $(git current-tag)^'"
changelog = "!sh -c 'git --no-pager lg --first-parent $(git previous-tag)..$(git current-tag)'"
@jeantil
jeantil / Administratif.md
Created August 30, 2016 13:26
Objectifs video CPE 2 septembre
  • Devis salles pour formation (lundi et mardi)
  • Mise à disposition de réseau filaire dans les salles (a minima grand amphi) pour l'enregistrement et le streaming
@jeantil
jeantil / perf.md
Last active August 25, 2016 09:20
Mesure de perf JVM

Mesure System

  • sysbench
  sysbench --test=memory --memory-block-size=$size --memory-total-size=10G run
  sysbench --test=cpu --num-threads=1 run
  • dstat: https://github.com/dagwieers/dstat
    • ./dstat/dstat --proc --cpu --cpu-use --sys --mem-adv --swap --page --disk -D total --disk-tps --net --time --output my-dstat-output.csv