This file contains 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 | |
# LICENSE: BSD3-Clause | |
# made by Sythelux Rikd | |
# DESC: this script creates a montage of images within a folder to create a folder icon for nemo | |
# it respects folder.jpg and .folder.jpg being set | |
# it is rather imperformant, maybe someone will improve it. | |
# needs to be put into /usr/bin/folder-thumbnailer |
This file contains 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
///<author email="dersyth@gmail.com">Sythelux Rikd</author> | |
public class WaitOnTask : CustomYieldInstruction | |
{ | |
private Task _task; | |
private bool _taskDone; | |
public override bool keepWaiting => !_taskDone; | |
public WaitOnTask(Task task) | |
{ |
This file contains 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 | |
# my move is supposed to copy source to target recursively. if target already exists it checks file size | |
#if size is the same delete old one | |
#if size is different keep old and new | |
source=$1 | |
target=$2 | |
IFS=$'\n' | |
if [ -d "$source" ]; then |
This file contains 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 ads; | |
import java.text.MessageFormat; | |
import java.util.*; | |
/** | |
* Created by sythelux on 25.04.17. | |
*/ | |
public class Serie3 { | |
private static Random random = new Random(); |
This file contains 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
skinparam Activity { | |
ArrowColor | |
ArrowFontColor | |
ArrowFontName | |
ArrowFontSize | |
ArrowFontStyle | |
BackgroundColor | |
BarColor | |
BorderColor | |
BorderThickness |
This file contains 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 class ReusableIDGenerator { | |
private static Map<Integer, Boolean> map = Collections.synchronizedMap(new HashMap<Integer, Boolean>()); | |
private ReusableIDGenerator() {} | |
public static int get() { | |
for (int i = 0; i < Integer.MAX_VALUE; i++) { | |
if (map.containsKey(i)) { | |
if (!map.get(i)) { | |
map.put(i, true); |
This file contains 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 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 |
This file contains 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 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. |
NewerOlder