Skip to content

Instantly share code, notes, and snippets.

@reytech-dev
reytech-dev / Fix.md
Last active March 20, 2024 10:19
ZONE_CONFLICT: 'docker0' already bound to a zone
  1. Check if docker zone exists in firewall-cmd
$ firewall-cmd --get-active-zones
  1. If "docker" zone is available, change interface to docker0 (not persisted)
$ sudo firewall-cmd --zone=docker --change-interface=docker0
  1. If "docker" zone is available, change interface to docker0 (persisted, thanks rbjorklin)
@witwall
witwall / deskew.java
Created May 12, 2013 22:27
Automatic image deskew in Java http://anydoby.com/jblog/en/java/1990 Those who have to process scans should know how painful it is to manually deskew images. There are several approaches to do this deskewing automatically. The basis of all the methods is to identify lines following the same direction in a image and then by deviation from horizon…
public double doIt(BufferedImage image) {
final double skewRadians;
BufferedImage black = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_BINARY);
final Graphics2D g = black.createGraphics();
g.drawImage(image, 0, 0, null);
g.dispose();
skewRadians = findSkew(black);
System.out.println(-57.295779513082320876798154814105 * skewRadians);
return skewRadians;
@Zidkon
Zidkon / TeleportFixThree.java
Created September 25, 2012 01:33
Quick Fix to aadnk TeleportFixTwo
package com.comphenix.example;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;