Skip to content

Instantly share code, notes, and snippets.

View fpavageau's full-sized avatar

Frank Pavageau fpavageau

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fpavageau on github.
  • I am fpavageau (https://keybase.io/fpavageau) on keybase.
  • I have a public key ASDkkhW4vsMCcPGhLiQpNWrVngeTUO1X9z49I3LJ2JE7AAo

To claim this, I am signing this object:

<dependency>
<groupId>net.biville.florent</groupId>
<artifactId>neo4j-sproc-compiler</artifactId>
<version>1.0-M01</version>
<optional>true</optional>
</dependency>
-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintPromotionFailure -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime
@fpavageau
fpavageau / gist:6548036
Created September 13, 2013 08:24
touilleur-express.rss
$ wget -O te.rss -S --no-cache http://www.touilleur-express.fr/feed/
--2013-09-13 10:22:00-- http://www.touilleur-express.fr/feed/
Resolving www.touilleur-express.fr (www.touilleur-express.fr)... 108.162.198.69, 108.162.199.69
Connecting to www.touilleur-express.fr (www.touilleur-express.fr)|108.162.198.69|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.0 200 OK
Server: cloudflare-nginx
Date: Fri, 13 Sep 2013 08:22:00 GMT
Content-Type: text/xml; charset=UTF-8
Set-Cookie: __cfduid=d585c0f7d4f5f342f851f39add7b371c61379060520381; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.touilleur-express.fr
def fly = { String name ->
def initial = name.toList().inject(0, { a, b -> a + (int) b })
def height = initial, flight = []
def next = { (int) (it % 2) ? it * 3 + 1 : it / 2 }
while (true) {
flight << height
if (height > 1) { height = next(height) }
else { break }
}
println flight
@fpavageau
fpavageau / gist:4654628
Created January 28, 2013 10:59
Where you realize java.util.Calendar.add() is not commutative
Calendar cal1 = new GregorianCalendar(2013, Calendar.JANUARY, 28);
Calendar cal2 = new GregorianCalendar(2013, Calendar.JANUARY, 28);
Calendar cal3 = new GregorianCalendar(2013, Calendar.JANUARY, 28);
cal1.add(Calendar.DAY_OF_MONTH, 1);
cal1.add(Calendar.MONTH, 1);
cal2.add(Calendar.MONTH, 1);
cal2.add(Calendar.DAY_OF_MONTH, 1);
cal3.add(Calendar.MONTH, 1);
System.out.println(cal1.getTime().equals(cal2.getTime())); // false