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
/* | |
* Modified on August 8, 2005 | |
*/ | |
package tools; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import org.lwjgl.opengl.GL11; |
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 java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.concurrent.TimeUnit; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* | |
* @author Sythelux Rikd |
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 java.io.File; | |
import java.lang.ProcessBuilder.Redirect.Type; | |
import java.util.Arrays; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.Level; | |
import org.apache.log4j.Logger; | |
/** This Class Provides a Way to Serialize and deserialize Simple Processbuilder Commands. For this it will use the Bash Syntax. | |
* |
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 java.io.File; | |
import java.lang.management.ManagementFactory; | |
import java.text.DecimalFormat; | |
import java.text.NumberFormat; | |
import java.util.Locale; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.Logger; |
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
public enum ByteUnit { | |
BYTE { | |
public long toBytes(long d){return d;} | |
public long toKilos(long d){return d/(DEC1/DEC0);} | |
public long toMegas(long d){return d/(DEC2/DEC0);} | |
public long toGigas(long d){return d/(DEC3/DEC0);} | |
public long toTeras(long d){return d/(DEC4/DEC0);} | |
public long toPetas(long d){return d/(DEC5/DEC0);} | |
public long toExas(long d){return d/(DEC6/DEC0);} | |
public long toZettas(long d){return d/(DEC7/DEC0);} |
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
/* | |
*Copyright (c) 2015, Sythelux Rikd All rights reserved. | |
* | |
*Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
* | |
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
* | |
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
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 java.io.InputStream; | |
import java.net.URL; | |
import java.util.Collections; | |
import java.util.jar.Attributes; | |
import java.util.jar.JarFile; | |
import java.util.jar.Manifest; | |
public class BuildInfoBuilder { | |
public static String buildInfo() { |
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
/* | |
*Copyright (c) 2015, Sythelux Rikd All rights reserved. | |
* | |
*Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
* | |
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
* | |
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
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
@GET | |
@Path("timeAsGif.gif") | |
@Produces("image/gif") | |
public Response timeAsGif() throws IOException { | |
try { | |
ByteArrayOutputStream bos = new ByteArrayOutputStream(255); | |
ImageOutputStream output = ImageIO.createImageOutputStream(bos); | |
GifSequenceWriter writer = new GifSequenceWriter(output, BufferedImage.TYPE_BYTE_INDEXED, (int) TimeUnit.MINUTES.toMillis(1), false); |
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/sh | |
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. | |
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then | |
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script | |
fi | |
### BEGIN INIT INFO | |
# Provides: MyApp | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 |