Skip to content

Instantly share code, notes, and snippets.

View batmat's full-sized avatar
😞
I may be very very slow to respond.

Baptiste Mathus batmat

😞
I may be very very slow to respond.
View GitHub Profile
#!/bin/bash
repo=$1
rm -f ok.list ko.list
cd $repo
for i in `git tag`
do
echo "Trying to build $i tag"
git checkout $i
@batmat
batmat / gist:3771370
Created September 23, 2012 14:11
list of technos
4Course
83%
Android
Apollo
Aurora
B52 Rock Lobster
Baikal
Bali
Bali
Bamboo
@batmat
batmat / Main.java
Created February 7, 2013 21:03
JDK8 sample code (not working)
// JDK8 sample (not working) with java[c] 1.8.0-ea downloaded on the 06 of february, 2013
import java.util.*;
public class Main
{
public static void main(String[] args){
List<String> list = new ArrayList<>();
list.add("pof");
list.add("pouf");
@batmat
batmat / gist:5892567
Created June 29, 2013 20:38
rpm-m-p jdk1.5 rhel 5.9 ec2
[INFO] Installing /root/rpm-maven-plugin/pom.xml to /root/rpm-maven-plugin/target/local-repo/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-3-SNAPSHOT/rpm-maven-plugin-2.1-alpha-3-SNAPSHOT.pom
[INFO] Installing /root/rpm-maven-plugin/target/rpm-maven-plugin-2.1-alpha-3-SNAPSHOT.jar to /root/rpm-maven-plugin/target/local-repo/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-3-SNAPSHOT/rpm-maven-plugin-2.1-alpha-3-SNAPSHOT.jar
[INFO] [invoker:run {execution: integration-test}]
[INFO] Building: rpm-disable/pom.xml
[INFO] ..FAILED (18.9 s)
[INFO] The build exited with code 1. See /root/rpm-maven-plugin/target/it/rpm-disable/build.log for details.
[INFO] Building: rpm-reactor/pom.xml
[INFO] ..FAILED (16.3 s)
[INFO] The build exited with code 1. See /root/rpm-maven-plugin/target/it/rpm-reactor/build.log for details.
[INFO] Building: rpm-2/pom.xml
@batmat
batmat / random-win.sh
Created June 30, 2013 20:49
Quick&dirty script used to random choose someone present at a JUG event
#!/bin/bash
people=participants.csv
clear
echo
echo
echo
echo
figlet " Qui va gagner ?"
@batmat
batmat / WhichGC.java
Created July 11, 2013 20:13
Small code to be able to check a VM and the activated GC. Also useful to run a VM so that you have time to run VisualVM or something similar.
import java.util.*;
import java.lang.management.*;
public class WhichGC
{
public static void main(String[] args) throws Exception
{
int seconds = 60;
if(args.length>=1)
{
@batmat
batmat / patch-project-roles.md.diff
Created August 5, 2013 11:43
Maven project-roles.md proposed small patch.
Index: content/markdown/project-roles.md
===================================================================
--- content/markdown/project-roles.md (revision 1510429)
+++ content/markdown/project-roles.md (working copy)
@@ -54,7 +54,7 @@
we will welcome you with open arms… (and if we don't welcome you
with open arms, please advise the [Project management committee][3]
who are responsible for ensuring that the community is a healthy
-one)
+one).
<build>
<pluginManagement>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
@batmat
batmat / gitbackup-config
Last active August 29, 2015 13:57
git backup (put this in your .git/config or better in your global gitconfig file).
[alias]
backup = "!f(){ git add -A . && git ci -q -m \"WIP backup\" && commit=`git show HEAD|head -1` && git reset HEAD~ && echo \"Backup OK: $commit (or use git reflog)\"; };f"
@batmat
batmat / jsr308-illustration
Created April 16, 2014 13:58
JSR 308 Illustration : Multiple same annotations on the same elements don't require wrapping it from Java 8
// Legacy style
@SomeAnnotations({
@SomeAnnotation(..a..),
@SomeAnnotation(..b..),
@SomeAnnotation(..c..),
})
public class SomeClass {
...
}