Skip to content

Instantly share code, notes, and snippets.

View xseignard's full-sized avatar
🦄
Internet thuggin'

Xavier Seignard xseignard

🦄
Internet thuggin'
View GitHub Profile
@xseignard
xseignard / TestPreemptive.java
Created December 15, 2011 18:22
TestPreemptive.java
package com.podprogramming.jabber.bot.util;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
@xseignard
xseignard / StartMysqlMojo.java
Created January 17, 2012 14:02
In memory mysql mojo
/*******************************************************************************
* Copyright (c) 2012 Pod Programming (http://www.pod-programming.com).
* All rights reserved.
*******************************************************************************/
package com.podprogramming.mysql.mojo;
import java.io.File;
import java.sql.DriverManager;
import java.sql.SQLException;
@xseignard
xseignard / Demo.java
Created February 17, 2012 14:11
Demo.java
package fr.free.mdwhatever.arduino.maven;
import gnu.io.CommPortIdentifier;
import gnu.io.NoSuchPortException;
import gnu.io.SerialPort;
import gnu.io.SerialPortEvent;
import gnu.io.SerialPortEventListener;
import java.io.IOException;
import java.net.URL;
@xseignard
xseignard / profile.xml
Created March 27, 2012 04:02
Quality analysis with jacoco and sonar
<profile>
<id>quality</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Jacoco version -->
<jacoco.version>0.5.6.201201232323</jacoco.version>
<!-- Sonar properties -->
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
@xseignard
xseignard / gist:2821402
Created May 28, 2012 22:03
mongo-emf without OSGI
try {
// some model
Library lib = LibraryFactory.eINSTANCE.createLibrary();
lib.setName("Test");
Book book = LibraryFactory.eINSTANCE.createBook();
book.setTitle("Title");
lib.getBooks().add(book);
// provider conf
MongoProvider mongoProvider = new MongoProvider();
@xseignard
xseignard / gist:2917348
Created June 12, 2012 12:59
bounce.less
/* ===================
* Bounce animation
*/
.bounce(@orientation:left, @delta:20px, @duration:1s, @bounces:infinite) {
-moz-animation:bounce @duration linear @bounces;
-webkit-animation:bounce @duration linear @bounces;
@-moz-keyframes bounce { .bounceFrames(@orientation, @delta) }
@-webkit-keyframes bounce { .bounceFrames(@orientation, @delta) }
@xseignard
xseignard / console.txt
Created June 19, 2012 08:19
console.txt
javax.xml.ws.soap.SOAPFaultException: Exception thrown from the following code:
java.lang.NullPointerException
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
at $Proxy66.validateAddressPOD(Unknown Source)
at com.podprogramming.podbox.core.impl.AddressCleanUpServicePB.cleanUpAddresses(AddressCleanUpServicePB.java:192)
at com.podprogramming.podbox.core.impl.AddressCleanUpServicePB$$FastClassByCGLIB$$9ad51e5d.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)
@xseignard
xseignard / pom.xml
Created July 3, 2012 11:24
upload p2 repo
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2010, 2011 SAP AG and others. All rights reserved. This
program and the accompanying materials are made available under the terms
of the Eclipse Public License v1.0 which accompanies this distribution, and
is available at http://www.eclipse.org/legal/epl-v10.html Contributors: SAP
AG - initial API and implementation -->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@xseignard
xseignard / workspaceMechanic.md
Created July 11, 2012 14:50
Shared conf for workspace mechanic with dropbox

#Workspace Mechanic# This plugin allows the team to share the same code convention parametrization in Eclipse. ##Installation## Use the following update site : http://workspacemechanic.eclipselabs.org.codespot.com/git.update/mechanic ##Configuration##

  • close Eclipse
  • run the following command in a terminal :

mkdir -p ~/.eclipse/mechanic && ln -s "$HOME/Dropbox/the_folder_where_your_conf_is_stored/" $HOME/.eclipse/mechanic

@xseignard
xseignard / gist:3750697
Created September 19, 2012 16:44
38kHz signal with breakout js
arduino.setDigitalPinMode(11, Pin.PWM);
var led = arduino.getDigitalPin(11);
console.log(led);
var freq = 0.000026316; // 38kHz = 38000 cycles per seconds = 38000^-1 seconds per cycle = 0.000026316 seconds per cycle
var amplitude = 2.0;
var offset = 0;
var phase = 0;
var repeat = 0;
var sinewave = new Oscillator(Oscillator.SIN, freq, amplitude, offset, phase, repeat);
led.addGenerator(sinewave);