Skip to content

Instantly share code, notes, and snippets.

Luca lucatk

Block or report user

Report or block lucatk

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
@lucatk
lucatk / imagemagick.rb
Last active Feb 8, 2017 — forked from asanchez75/ImageMagick 6.9.7-4 Homebrew Formula.md
Homebrew Formula for ImageMagick 6.9.7-7
View imagemagick.rb
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
@lucatk
lucatk / YourPlugin.java
Created Aug 31, 2014
Save resource file to specific folder
View YourPlugin.java
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)
@lucatk
lucatk / LocationSerializable.java
Last active Aug 29, 2015
Class for serializing Locations (Bukkit)
View LocationSerializable.java
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 {
You can’t perform that action at this time.