Skip to content

Instantly share code, notes, and snippets.

View jan-krueger's full-sized avatar
🐢
I am a turtle...

Jan Krüger jan-krueger

🐢
I am a turtle...
View GitHub Profile
@aspyct
aspyct / workaround.php
Created August 22, 2012 16:10
The most undebuggable PHP snippet ever
<?php
define("true ", false);
function doIt() {
define(" false", true);
define("maybe", rand() & 1);
}
function  ($stupid="clever") {
if (assert_value($stupid)) {
@plentz
plentz / nginx.conf
Last active November 16, 2024 14:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
public class DamageUtil {
public static void createExplosion(Projectile pro, WeaponType weapontype, LivingEntity shooter) {
int radius = weapontype.getDamage();
Location loc = pro.getLocation();
List<Entity> en = pro.getNearbyEntities(radius, radius, radius);
pro.getLocation().getWorld().createExplosion(loc, 0.0F, false);
for (Entity ent : en) {
if (ent instanceof LivingEntity) {
HumanEntity le = (HumanEntity) ent;
Location eyeloc = le.getEyeLocation();
@kelvneo
kelvneo / FrostSidebar.java
Last active August 29, 2015 13:59
This is a neat way of placing a sidebar. No NMS or CraftBukkit required. It requires Guava though. You may copy the code for your own use. Github Page: https://github.com/deathline75/FrostLib
package com.frosty.frostlib;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
@codebucketdev
codebucketdev / UUIDFetcher.java
Created July 5, 2014 13:04
This snippet is a part from my MojangRepository.
package de.codebucket.utils;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.Proxy;
import java.net.URL;
import java.util.UUID;