Skip to content

Instantly share code, notes, and snippets.

View chocolatey.packages
choco install ChocolateyGUI -y
choco install ConEmu -y
choco install ditto -y
choco install f.lux -y
choco install fiddler4 -y
choco install Graphviz -y
choco install greenshot -y
choco install javaruntime -y
choco install jre8 -y
choco install keepass -y
View Java8Tips
// Avoid NPE simply taken from :
public static <T> Optional<T> resolve(Supplier<T> resolver) {
try {
T result = resolver.get();
return Optional.ofNullable(result);
catch (NullPointerException e) {
return Optional.empty();
View .gitconfig
name = lfo
email =
lg = !"git lg1"
lg1 = !"git lg1-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
co = checkout
br = branch
ci = commit
lfo / SongRecommendation
Last active Aug 29, 2015
Song recommendation
View SongRecommendation
== Song Recommendation
According to this simple following graph :
I would like to get recommendation for songs and artists. Indeed, Artist has recorded songs that some persons love.
If somebody love the same song than mine, I will more probably love its other loved songs.
lfo / Dart code sample
Last active Aug 29, 2015
Gist comprenant le code dart des slides
View Dart code sample
import 'dart:convert' show JSON;
import 'dart:io';
import 'dart:async';
// Définition d’une fonction.
printNumber(num aNumber) {
print('The number is $aNumber.'); // Écrit dans la console.
lfo / LearnCypherWithTheCure
Last active Jan 4, 2016
Learn Cypher with The Cure
View LearnCypherWithTheCure
= Learn cypher with The Cure.
All informations are from wikipedia :
CREATE (theCure:Artist { name:'The Cure' })
lfo / launchMaven
Created Jul 19, 2013
Debug maven test externally in windows share mode
View launchMaven
mvn clean install -Dmaven.surefire.debug=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,address=Maven,suspend=n
# In Netbeans Debug/attachDebugger with
# connector : SharedMemory
# Name : Maven
# Timeout : 10 000
lfo / ClassUtil
Created Jul 5, 2013
Some usefull reflection method
View ClassUtil
import java.lang.reflect.ParameterizedType;
public class ClassUtil {
public static Class getParameterClass(Class parametizedClass, int index) {
return (Class) ((ParameterizedType) parametizedClass.getGenericInterfaces()[0]).getActualTypeArguments()[index];