Skip to content

Instantly share code, notes, and snippets.

Jofkos Jofkos

Block or report user

Report or block Jofkos

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
@Jofkos
Jofkos / fixDate.sh
Last active Aug 14, 2017
Fixes the date from exported photos. (Sets the file-system date to the recording date from exif data)
View fixDate.sh
#!/bin/bash
# Run in folder containing the pictures
for file in *
do
if [[ $(file --mime-type -b "${file}") == image/* ]]
then
touch -t "$(exiftool -createdate $file | awk -F ':| +' '{ print $5$6$7$8$9"."$10 }')" $file;
fi
done
View style.css
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);
@-webkit-keyframes a {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg)
}
to {
-webkit-transform: rotate(1turn);
transform: rotate(1turn)
@Jofkos
Jofkos / start.sh
Last active Oct 27, 2019
Minecraft server tmux startscript
View start.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: Minecraft-Server
# Required-Start: $all
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts minecraft server at boot time
# Description: Starts minecraft server at boot time
### END INIT INFO
@Jofkos
Jofkos / start.sh
Last active Sep 27, 2015
BungeeCord/Spigot tmux bash start script
View start.sh
#!/bin/bash
#base directory is this script's parent dir
cd $(dirname "$0")
#server/proxy directories, first one has to be the bungeecord directory
servers=("bungee" "lobby" "serverone" "servertwo")
#dir which contains the server/proxy directories (`pwd` -> current dir)
View PropertyWrapper.java
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
@Jofkos
Jofkos / UUIDFetcher.java
Last active Oct 6, 2017
UUIDFetcher (Java 7)
View UUIDFetcher.java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
View UUIDFetcher.java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Consumer;
View AsyncMysql.java
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Consumer;
import org.bukkit.Bukkit;
@Jofkos
Jofkos / GameProfileBuilder.java
Last active Feb 17, 2018
GameProfileBuilder
View GameProfileBuilder.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
View PlayerList.java
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
You can’t perform that action at this time.