Skip to content

Instantly share code, notes, and snippets.

View JBou's full-sized avatar

Gabriel Patzleiner JBou

View GitHub Profile
@DarkSeraphim
DarkSeraphim / ActionBarExample.java
Last active November 5, 2015 16:07
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
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 December 2, 2015 22:23
Example build script for liteloader 1.8 mods. Put the mcpnames jar in the libs folder.
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 December 20, 2015 22:09
Simple Fuzzy Search
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 December 29, 2015 04:59
A tiny class to make strange crypted animated text as you know it from Minecraft. Sounds useless? It is useless! :D
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 January 1, 2016 07:49 — forked from arxenix/Bukkit Annotation Commands
Fixed access modifiers allowing for @command and @completer to be used outside of just that package
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 October 6, 2017 12:14
UUIDFetcher (Java 7)
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 January 8, 2019 17:13
CURL vBulletin Login and get POST - 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 August 8, 2019 23:49
These are utils which make dealing with reflection much easier.
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 November 1, 2012 18:34
Google Plus Scroll Style
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}
@kylef
kylef / sabnzbd.py
Created January 11, 2010 15:04
SABnzbd python api
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+
"""