Skip to content

Instantly share code, notes, and snippets.

View mikroskeem's full-sized avatar
👻

Mark Vainomaa mikroskeem

👻
View GitHub Profile
@aadnk
aadnk / ArtificalChunkErrors.java
Created March 23, 2014 20:12
Prevent certain chunks from being processed by certain players.
package com.comphenix.example;
import org.bukkit.plugin.java.JavaPlugin;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
@ycarmel
ycarmel / bash-history-to-zsh-history.js
Last active December 23, 2019 05:16
Bash history to Zsh history
// This is how I used it:
// $ node bash-history-to-zsh-history.js >> ~/.zsh_history
var fs = require("fs");
var a = fs.readFileSync(".bash_history");
var time = Date.now();
a.toString().split("\n").forEach(function(line){
console.log(": "+ (time++) + ":0;"+line);
});
@aadnk
aadnk / SendRawTellPacket.java
Created January 1, 2014 03:36
Send a raw tell command to a player through ProtocolLib.
package com.comphenix.example;
import java.lang.reflect.InvocationTargetException;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
@windytan
windytan / emoji.pl
Last active August 14, 2023 14:50
Visualize SSH public key fingerprints using Unicode emoji
# Oona Räisänen 2013
# http://windytan.com
# ssh-keygen -l -f ~/.ssh/id_rsa.pub | perl emoji.pl
@emoji = qw( 🌀 🌂 🌅 🌈 🌙 🌞 🌟 🌠 🌰 🌱 🌲 🌳 🌴 🌵 🌷 🌸
🌹 🌺 🌻 🌼 🌽 🌾 🌿 🍀 🍁 🍂 🍃 🍄 🍅 🍆 🍇 🍈
🍉 🍊 🍋 🍌 🍍 🍎 🍏 🍐 🍑 🍒 🍓 🍔 🍕 🍖 🍗 🍘
🍜 🍝 🍞 🍟 🍠 🍡 🍢 🍣 🍤 🍥 🍦 🍧 🍨 🍩 🍪 🍫
🍬 🍭 🍮 🍯 🍰 🍱 🍲 🍳 🍴 🍵 🍶 🍷 🍸 🍹 🍺 🍻
@Tasssadar
Tasssadar / mako-aosp-Implement-kexec-hardboot.patch
Last active January 7, 2022 17:10
kexec-hardboot for LG Nexus 4 (mako)
From a5c71c50da839c6932af1903bcc0036daa033f7e Mon Sep 17 00:00:00 2001
From: Vojtech Bocek <[email protected]>
Date: Mon, 30 Sep 2013 18:02:43 +0200
Subject: [PATCH] Implement kexec-hardboot
"Allows hard booting (i.e., with a full hardware reboot) to a kernel
previously loaded in memory by kexec. This works around the problem of
soft-booted kernel hangs due to improper device shutdown and/or
reinitialization."
More info in /arch/arm/Kconfig.
##!/usr/bin/env python
# -*- coding: utf-8 -*-
"""yggdrasil.py
A tool for debugging and exploring yggdrasil, Minecraft's new
authentication system.
Usage:
yggdrasil.py login <username> [--password=<password>]
yggdrasil.py migrated <username>
@stephan-gh
stephan-gh / ServerListAPI.java
Last active February 29, 2024 20:05
API to modify some advanced Minecraft server list data.
/*
* ServerListAPI - API to modify some advanced Minecraft server list data
* Copyright (C) 2013 Minecrell
* You are not allowed to use this API to fake online players on a production server.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@b1naryth1ef
b1naryth1ef / jsonapi.py
Created February 20, 2013 22:03
Bukkit JSONAPI Python API (That doesnt suck, and uses requests)
import requests, hashlib, json
class API(object):
def __init__(self, host, port, user, pw, salt="mysalt"):
self.host = host
self.port = port
self.user = user
self.pw = pw
self.salt = salt
self.url = "http://%s:%s/api/call" % (self.host, self.port)
@aadnk
aadnk / MobSpawner.java
Created December 14, 2012 14:57
Spawn a fake mob using ProtocolLib
package com.comphenix.example;
import java.lang.reflect.InvocationTargetException;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
@aadnk
aadnk / LoggedPluginManager.java
Created October 13, 2012 23:58
Simple proxy-classes for adding better error handling in Minecraft.
/*
* Logged-classes - Simple proxy-classes for adding better error handling in Minecraft.
* Copyright (C) 2012 Kristian S. Stangeland
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,