I hereby claim:
- I am lucatk on github.
- I am lucatk (https://keybase.io/lucatk) on keybase.
- I have a public key ASD57z4qgRo0jUsRjI0r60KcFv9XyIodP1R4f-40dqw3PAo
To claim this, I am signing this object:
import java.util.HashMap; | |
import java.util.Map; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.World; | |
import org.bukkit.configuration.serialization.ConfigurationSerializable; | |
import org.bukkit.util.NumberConversions; | |
public class LocationSerializable extends Location implements ConfigurationSerializable { |
public boolean saveResourceToPath(String resourcePath, String targetFolder) { | |
InputStream in = getResource(resourcePath); | |
if(in == null) | |
return false; | |
int lastIndex = resourcePath.lastIndexOf('/'); | |
File outDir = new File(dataFolder, resourcePath.substring(0, lastIndex >= 0 ? lastIndex : 0)); | |
if(!outDir.exists()) | |
outDir.mkdirs(); | |
File outFile = new File(targetFolder, resourcePath) |
require 'formula' | |
class Imagemagick < Formula | |
homepage 'http://www.imagemagick.org' | |
url 'http://www.imagemagick.org/download/ImageMagick-6.9.7-7.tar.bz2' | |
sha256 'c0454629e7d3cbced6df31c2c3b6cbfbe8088437e511c1e3a70de2f18d4e6694' | |
head 'https://www.imagemagick.org/subversion/ImageMagick/trunk', | |
:using => UnsafeSubversionDownloadStrategy |
I hereby claim:
To claim this, I am signing this object:
This is just a wee little script for having automated backups of a single-node Rancher instance on docker. The script stops the container, backs its data up and simply uploads the backup file to S3 using s3cmd.
Made for and tested on Ubuntu 18.04.
You can then for example setup a simple cron job for it like this: (every day at 5a.m.)
0 5 * * * /usr/bin/bash /root/backup.sh