Skip to content

Instantly share code, notes, and snippets.

View mcgivrer's full-sized avatar
🌐
Work onto a Platform !

Frédéric Delorme mcgivrer

🌐
Work onto a Platform !
View GitHub Profile
@mcgivrer
mcgivrer / pom.xml
Last active December 16, 2015 06:58
Maven pom.xml file with multi-plateforme dependencies
<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>fr.mcgivrer.samples</groupId>
<artifactId>swt-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>swt-project</name>
<description>Dicovering SWT API/description>
<build>
{
"working_dir": "$file_path",
"shell_cmd":"mvn clean install",
"variants": [
{
"name": "mvn clean install",
"shell_cmd": "mvn clean install"
},
{
"name": "mvn full build",
@mcgivrer
mcgivrer / GenericRepository.java
Last active June 7, 2016 12:34
JPA Light Generic repository from scratch
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
@mcgivrer
mcgivrer / .gitignore
Last active April 16, 2025 22:04
Standard Java desktop maven project with a pom.xml file, a README.md, and some Continuous integration configuration files (AppVeyor and Travis-CI, more to come...)
target/
.project
.classpath
.settings/
@mcgivrer
mcgivrer / pom.xml
Created March 31, 2017 21:03
Maven Standard Java project
<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>[group_id]</groupId>
<artifactId>[artifact_id]</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>[project_name]</name>
<description>[project_description]</description>
@mcgivrer
mcgivrer / AbstractGamePanel.java
Last active January 12, 2018 00:49
A VERY Basic framework to ignite a game, with the very standard structure : initialize(), loop(), input(), update(float) and render(Graphics2D). Also provide a simple input handler to manage key events
package com.snapgames.tutorials.t001.flavour2;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import javax.swing.JPanel;
import com.snapgames.tutorials.core.io.InputHandler;
@mcgivrer
mcgivrer / Drop.java
Last active July 7, 2017 13:57
Java 2D RainDrop
private class Drop {
double x0;
double y0;
double v0; //initial velocity
double t; //time
double angle;
double x;
double y;
@mcgivrer
mcgivrer / .gitignore
Last active March 20, 2024 07:45
The -Ultimate Maven Project Kit- to build project with sources, javadoc, only-one-shaded-jar, windows executable, publish artifact to git, verify version and add licenses !
/target/
/.classpath
/.project
/.vscode
/.idea
/dependency-reduced-pom.xml
/bin/
@mcgivrer
mcgivrer / Vector2D.java
Last active January 25, 2018 22:42
Math Helpers : Vector2D class to manage Vector !
/**
* SnapGames
*
* @year 2017
*
*/
package com.snapgames.sample.basicplayer.math;
/**
* Internal Class to manipulate simple Vector2D.
@mcgivrer
mcgivrer / Configuration.java
Last active May 24, 2018 12:31
A simple Java Configuration class to provide some easy configuration capabilities to any Java project.
/**
* This `Configuration` class load properties from `res/configuration.properties` file.
* some provided helpers will retrieve:
* - String value `Configuration.get(String key, String default)`
* - int value `Configuration.getInteger(String key, inf default)`
* - float value `Configuration.getFloat(String key, float default)`
*
* @author McGivrer
* @see https://gist.github.com/McGivrer
* @see https://twitter.com/McGivrer