Skip to content

Instantly share code, notes, and snippets.

Riccardo Balbo riccardobl

  • Italy
Block or report user

Report or block riccardobl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@riccardobl
riccardobl / build.gradle
Last active Sep 10, 2019
Asset pack gradle
View build.gradle
apply plugin: 'maven'
apply plugin: 'java'
sourceSets {
main {
resources {
srcDirs = ["."]
include "**"
exclude (".gitignore", ".github",
"build", ".gradle", "README.md",
View README.md to html.html
<html>
<head></head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.min.js" integrity="sha256-0Ed5s/n37LIeAWApZmZUhY9icm932KvYkTVdJzUBiI4=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/1.0.11/purify.min.js" integrity="sha256-80n5dmervCuGISioxGlsumrwgMc8LJKT0wZybkLtkLM=" crossorigin="anonymous"></script>
<script>
function loadGithubReadme(repo,branch,callback){
if(repo.endsWith("/"))repo=repo.substring(0,repo.length-1);
console.log("Repo:",repo);
@riccardobl
riccardobl / AppSettings.java.PATCH
Created May 6, 2019
Fix GL versions support for jme+lwjgl2
View AppSettings.java.PATCH
--- <unnamed>
+++ <unnamed>
@@ -70,6 +70,8 @@
*/
public static final String LWJGL_OPENGL2 = "LWJGL-OpenGL2";
+ public static final String LWJGL_OPENGL30 = "LWJGL-OpenGL30";
+
/**
* Use LWJGL as the display system and force using the core OpenGL3.2 renderer.
@riccardobl
riccardobl / Fix freelan installation in ubuntu
Created Oct 15, 2018
Fix freelan installation in ubuntu
View Fix freelan installation in ubuntu
#!/bin/bash
mv /etc/freelan/freelan.cfg /etc/freelan/freelan.conf
ln /bin/freelan /usr/sbin/freelan
chmod +x /usr/sbin/freelan
echo 'CONFIGURATIONS="freelan"' > /etc/default/freelan
View keybase.md

Keybase proof

I hereby claim:

  • I am riccardobl on github.
  • I am riccardobl (https://keybase.io/riccardobl) on keybase.
  • I have a public key whose fingerprint is 9550 68E8 BC68 BBFF 6A16 34E8 19F0 7DE6 BB85 5778

To claim this, I am signing this object:

View BuildApitrace.sh
#!/bin/bash
rm -rf apitrace/
sudo apt-get update
sudo apt-get install -y build-essential cmake git python libpng-dev zlib1g-dev libx11-dev libprocps-dev libdwarf-dev qtbase5-dev
git clone https://github.com/apitrace/apitrace.git
cd apitrace
if [ "$1" = "install" ];
then
cmake -H. -Bbuild -DENABLE_GUI=TRUE -DCMAKE_BUILD_TYPE=Release
make -C build
View ImportanceSampling.h
// Ported from https://github.com/jMonkeyEngine/jmonkeyengine/blob/PBRisComing/jme3-core/src/main/java/com/jme3/environment/generation/PrefilteredEnvMapFaceGenerator.java
// License: MIT
// To use this with GLSL set #define GLSL
// To use this with OpenCL set #define OpenCL
#define WRAP 0
#define STRETCH 1
#define FixSeamsMethod int
#ifdef GLSL
// Convert source from OpenCL to GLSL
@riccardobl
riccardobl / Gradle task to merge Log4j2Plugins.dat .md
Last active Dec 1, 2016
Gradle task to merge Log4j2Plugins.dat
View Gradle task to merge Log4j2Plugins.dat .md

A gradle task that merges Log4j2Plugins.dat from the various dependencies in a single file.

Useful when building a standalone jar.

If Log4j2Plugins.dat is not properly merged, log4j2 will print something like this:

ERROR StatusLogger Unrecognized format specifier [d]
ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [thread]
View TestInstanceNode.java
package tests;
import java.util.ArrayList;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
You can’t perform that action at this time.