Skip to content

Instantly share code, notes, and snippets.

View ludovicc's full-sized avatar
🎯
Focusing

Ludovic Claude ludovicc

🎯
Focusing
View GitHub Profile
@ludovicc
ludovicc / TestSequentialIoPerf.java
Created August 3, 2012 15:41
Performance test for different methods of sequential IO
package game;
import static java.lang.Integer.MAX_VALUE;
import static java.lang.System.out;
import static java.nio.channels.FileChannel.MapMode.READ_ONLY;
import static java.nio.channels.FileChannel.MapMode.READ_WRITE;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
@ludovicc
ludovicc / TestSerialisationPerf.java
Created July 11, 2012 16:02
Test performance of Java serialisation vs ByteBuffer vs Unsafe - copied from http://mechanical-sympathy.blogspot.com
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Arrays;
@ludovicc
ludovicc / git-to-p4-setup.sh
Created December 12, 2011 20:13
Git madness - Synchronisation from Git to P4
#
# Suppose that you are happily working with your sources in Git, and manager says 'Thou shalt use the company's Perforce repository'
#
# And you strike a deal: I keep working on Git, but all releases will also be published on Perforce
#
# === Initial setup, run this script once
# My project under Git is located at ~/MyProject
cd MyProject
@ludovicc
ludovicc / pom.xml
Created December 12, 2011 19:51
Maven - configure the Release plugin to work with a Git repository
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<!-- required for Git -->
<localCheckout>true</localCheckout>
<preparationGoals>clean verify</preparationGoals>
<releaseProfiles>release</releaseProfiles>
Topics to talk about at FOSDEM 2010 regarding Debian-Java:
* Status of maven-repo
* Merge of javahelper and maven-repo-helper?
* Dependencies - versioned or not?
* Versioned .jar files? why? parallell installation?
* CDBS vs. Debhelper7, dh -with maven?
* why it's useful to package Java software, Java packaging is way behind python packaging
* Bridging two great packaging systems: Debian apt and Maven
* OSGi in Debian: the promise of always on, always up-to-date systems