Skip to content

Instantly share code, notes, and snippets.

@DarkSeraphim
DarkSeraphim / ActionBarExample.java
Last active Nov 5, 2015
Using the ActionBar in 1.8 MC clients (currently written for the Spigot protocol hack). Explanation here: http://www.spigotmc.org/threads/news-bar-over-the-hotbar.30394/#post-345167
View ActionBarExample.java
package net.darkseraphim.actionbar;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import net.minecraft.server.v1_7_R4.EnumProtocol;
import net.minecraft.server.v1_7_R4.NetworkManager;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutChat;
import net.minecraft.util.com.google.common.collect.BiMap;
import net.minecraft.util.io.netty.channel.Channel;
@killjoy1221
killjoy1221 / build.gradle
Last active Dec 2, 2015
Example build script for liteloader 1.8 mods. Put the mcpnames jar in the libs folder.
View build.gradle
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
@PaulBGD
PaulBGD / FuzzySearch.java
Last active Dec 20, 2015
Simple Fuzzy Search
View FuzzySearch.java
public String findMatch(String arg, List<String> words, boolean ignoreRepeat) {
// Where the final word will be stored.
String word = null;
/*
* Sometimes two words will equally match (rarely). If we find one that matches, we
* increase this by one. Just in case the person wants it to return null, we have the
* ignoreRepeat.
*/
int repeated = 0;
@leMaik
leMaik / CryptedTextAnimation.cs
Last active Dec 29, 2015
A tiny class to make strange crypted animated text as you know it from Minecraft. Sounds useless? It is useless! :D
View CryptedTextAnimation.cs
using System;
using System.Text;
using System.Windows;
using System.Windows.Media.Animation;
namespace leMaik.Animations {
class CryptedTextAnimation : AnimationTimeline {
static CryptedTextAnimation() {
LengthProperty = DependencyProperty.Register("Length", typeof(int), typeof(CryptedTextAnimation));
}
@mcardy
mcardy / Bukkit Annotation Commands
Last active Jan 1, 2016 — forked from arxenix/Bukkit Annotation Commands
Fixed access modifiers allowing for @command and @completer to be used outside of just that package
View Bukkit Annotation Commands
package net.minezrc.framework.test;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
import org.bukkit.help.GenericCommandHelpTopic;
import org.bukkit.help.HelpTopic;
import org.bukkit.help.HelpTopicComparator;
import org.bukkit.help.IndexHelpTopic;
@Jofkos
Jofkos / UUIDFetcher.java
Last active Oct 6, 2017
UUIDFetcher (Java 7)
View UUIDFetcher.java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@saltun
saltun / curl-vbulletin-login.php
Last active Jan 8, 2019
CURL vBulletin Login and get POST - PHP
View curl-vbulletin-login.php
<?php
/**
* @author Savaş Can ALTUN <savascanaltun@gmail.com>
* www.savascanaltun.com.tr
* CURL vBulletin Login Example
* */
function vBulletinLogin($username,$password,$url,$posturl){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER,false);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'veri.txt');
@DarkBlade12
DarkBlade12 / ReflectionUtils.java
Last active Aug 8, 2019
These are utils which make dealing with reflection much easier.
View ReflectionUtils.java
package com.darkblade12.particledemo.particle;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Bukkit;
@fanzeyi
fanzeyi / scroll.css
Created Nov 1, 2012
Google Plus Scroll Style
View scroll.css
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}
@kylef
kylef / sabnzbd.py
Created Jan 11, 2010
SABnzbd python api
View sabnzbd.py
import urllib, json
class SABnzbd(object):
"""
Usage:
>>> from sabnzbd import SABnzbd
>>> s = SABnzbd('sakar.local', 8080, '4488f2881b90d7753bef8fb9e1bc56b3')
>>> s.pause() # Pauses the downloads
>>> s.shutdown() # Shut's down SABnzbd+
"""