testScene.blend: https://gist.github.com/riccardobl/38de2113eb379f04d7880be85165a4f4/raw/62d9e323949d6314c94063af208d41a9995890e5/testScene.blend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function enable { | |
pactl load-module module-loopback latency_msec=1 > ~/.micloopback.id | |
} | |
function disable { | |
pactl unload-module `cat ~/.micloopback.id` | |
} | |
if [ -f ~/.micloopback.id ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Usage: video2gif myvideo.mp4 | |
# | |
temp_dir=/tmp/video2gif-`tr -dc A-Za-z0-9 < /dev/urandom | head -c 8` | |
echo "Using temp directory $temp_dir" | |
mkdir "$temp_dir" | |
ffmpeg -i "$1" -r 15 -vf scale=-1:-1 "$temp_dir/frame-%04d.gif" | |
convert -delay 1x15 -loop 0 "$temp_dir/frame-*.gif" "$temp_dir/animation.gif" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Usage: ./updateOpenfire.sh DOWNLOADLINK | |
DL_LINK=$1 | |
BACKUP=openfire_backup`date '+%M.%d.%m.%Y'` | |
mv openfire $BACKUP | |
rm openfire.tar.gz | |
wget $DL_LINK -O openfire.tar.gz | |
tar -xzf openfire.tar.gz | |
cp -Rvf $BACKUP/conf openfire/ | |
cp -Rvf $BACKUP/embedded-db openfire/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Testcase for http://hub.jmonkeyengine.org/t/see-if-a-mesh-has-been-changed/35346/ | |
import com.jme3.app.SimpleApplication; | |
import com.jme3.material.Material; | |
import com.jme3.math.ColorRGBA; | |
import com.jme3.math.Vector3f; | |
import com.jme3.scene.Geometry; | |
import com.jme3.scene.Mesh; | |
import com.jme3.scene.SceneGraphVisitor; | |
import com.jme3.scene.Spatial; | |
import com.jme3.scene.VertexBuffer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install build-essential | |
sudo apt-get build-dep imagemagick | |
wdir=/tmp/`tr -dc A-Za-z0-9 < /dev/urandom | head -c 4`-immgk | |
sudo rm -Rf "$wdir" | |
sudo mkdir -p "$wdir" | |
sudo chmod 777 -Rf "$wdir" | |
cd "$wdir" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert images to dds files with mipmaps and compression using imagemagick. | |
#Requirements | |
Imagemagick >= 6.8.6-10 : https://gist.github.com/riccardobl/3aabaf82f74675a7b75b5878a5411789 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.lwjgl.opengl.GL15.GL_STATIC_DRAW; | |
import static org.lwjgl.opengl.GL15.glBindBuffer; | |
import static org.lwjgl.opengl.GL15.glBufferData; | |
import static org.lwjgl.opengl.GL15.glDeleteBuffers; | |
import static org.lwjgl.opengl.GL15.glGenBuffers; | |
import static org.lwjgl.opengl.GL30.glBindBufferBase; | |
import static org.lwjgl.opengl.GL31.GL_UNIFORM_BUFFER; | |
import java.io.IOException; | |
import java.lang.reflect.Field; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
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]