Skip to content

Instantly share code, notes, and snippets.

View athieriot's full-sized avatar

Aurélien Thieriot athieriot

View GitHub Profile
@athieriot
athieriot / Java8.java
Last active August 29, 2015 13:57
Java 8 features overview
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.*;
import java.time.format.DateTimeFormatter;
@athieriot
athieriot / ios-style.html
Created May 28, 2011 23:11 — forked from jamesarosen/ios-style.html
jQuery-UI iOS-Style Menu - a work in progress, using jQuery-UI 1.8
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Menu - Contextmenu demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
@athieriot
athieriot / EnumLabel.java
Created November 24, 2011 19:56
Little utility class to easily label any Java enum into a value in a message file
package fr.gist.util;
import java.lang.reflect.Method;
import java.util.ResourceBundle;
/*
* Auto Label enums matching a label.properties message file
*
* The message key has the format : <type>.<name>
*
@athieriot
athieriot / Curry.js
Created June 14, 2012 21:28
Trying to explain curryfication
#!/usr/bin/env node
//Declare curry method on every functions
Function.prototype.curry = function(arg1) {
//Keeping this just for later
var self = this;
//Keeping curried arg in the scope of the new function
var arg1 = arg1;
@athieriot
athieriot / spacer.rb
Last active December 17, 2015 04:28 — forked from adamtomecek/expand_tco.rb
Earthquake.init do
output_filter do |item|
next unless item['text']
text = item["text"]
puts "\n\n"
end
end
@athieriot
athieriot / JavaScript stack: An adventure in Toolchain
Last active December 18, 2015 17:49
Call for paper JSconf.eu 2013
It's been a while since the JavaScript community embraced Node.js. The ecosystem around Node changed many times since the early days. New tools are born, others die. We never had such a large choice of libraries and frameworks.
But as our community grows and matures, it's important to keep an eye on the tools that make the developer happy and improve the quality of our product: workflow automation helpers, testing, and so on.
In this talk, I will show the different pieces that compose a modern Node.js development stack and will try to put them in perspective in regard to the broad evolution of the Node.js ecosystem.
@athieriot
athieriot / pom.xml
Last active December 24, 2015 15:08
Both Scala and Java
<?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>scalanium</groupId>
<artifactId>scalanium</artifactId>
<version>1.0-SNAPSHOT</version>
@athieriot
athieriot / vim
Last active December 29, 2015 05:17
Vim
--------------------------------
BASICS
--------------------------------
i / insert
u / Undo
<ctrl-r> / Redo
:q / quit
:q! / force
@athieriot
athieriot / index.html
Last active January 3, 2016 08:19
Scrapping
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(document).ready(function() {
$.ajax("http://localhost:8000/lvdf.html").done(function(body) {
var title = $(body).find("#firstHeading").text()
$("#yeah-baby").text(title);
})
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://doc.akka.io/docs/akka-http/current/project/migration-guides.html</loc>
</url>
<url>
<loc>http://doc.akka.io/docs/akka-http/current/java/extending-akka.html</loc>
</url>
<url>
<loc>http://doc.akka.io/docs/akka-http/current/contrib/reliable-proxy.html</loc>
</url>