Skip to content

Instantly share code, notes, and snippets.

@PaulBGD
PaulBGD / Hologram.java
Last active December 3, 2016 18:16
No dependency 1.8+ holograms and item holograms
package net.burngames.decorations.utils;
import lombok.Getter;
import org.bukkit.Location;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
/**
* @author PaulBGD
@PaulBGD
PaulBGD / lint.js
Last active November 11, 2015 12:59
TypeScript linter
var configuration = {
rules: {
'variable-name': true,
'comment-format': [true, 'check-space'],
'curly': true,
'eofline': true,
'forin': true,
'indent': [true, 'spaces'],
'jsdoc-format': true,
'no-switch-case-fall-through': true,
@PaulBGD
PaulBGD / raven.d.ts
Last active October 10, 2015 19:11
Raven bindings for typescript
declare module "raven" {
export interface RavenClient {
patchGlobal():void;
captureMessage(message:any):void;
captureMessage(message:any, args:MessageArguments):void;
captureMessage(message:any, callback:(result:Result) => void):void;
captureMessage(message:any, args:MessageArguments, callback:(result:Result) => void):void;
captureError(message:any):void;
captureError(message:any, args:MessageArguments):void;
@PaulBGD
PaulBGD / README.md
Last active September 27, 2015 00:27
CaaS README

CaaS - Chester as a Service

Pricing

Limit pricing

This pricing is for raising the rate limit to the main chester brain.

  • $2.50/month - rate limit is raised to 5,000 questions per hour
  • $5.00/month - rate limit is raised to 10,000 questions per hour
(function() {
var letters = letters = {
'A': [
[, 1],
[1, , 1],
[1, , 1],
[1, 1, 1],
[1, , 1]
],
'B': [
@PaulBGD
PaulBGD / gist:4a637a871b8e0a67e967
Created July 16, 2015 04:42
Put this in your address bar to head to Chester's Skype
Chester is currently too busy to handle your request. Check out this dedicated Skype room!
skype:?chat&blob=DwqHBv-h_KtVeIuYMHt_7265uibJE7tUv9v2q_VIafmSxI7kJye06V0pk4qQxzo-ZXDDWkEF3A
import lombok.Data;
import org.apache.commons.lang3.Validate;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
/**
* @author PaulBGD
*/
@PaulBGD
PaulBGD / noadblock.js
Created June 20, 2015 03:49
Check if someone is using adblock
setTimeout(function() {
var adsbygoogle = document.getElementsByClassName('adsbygoogle');
if (adsbygoogle && adsbygoogle.length > 0 && adsbygoogle[0].childNodes.length == 0) {
console.log('Please turn off adblock!');
}
}, 1000);
@PaulBGD
PaulBGD / Ping.java
Created May 11, 2015 22:10
Find CraftPlayer ping
private static Class<?> craftPlayerClass;
private static Method getHandleMethod;
private static Field pingField;
private int getPing(Player player) {
if (player.getClass().getSimpleName().equals("CraftPlayer")) {
if (craftPlayerClass == null) {
craftPlayerClass = player.getClass();
}
if (getHandleMethod == null) {
/**
* @author PaulBGD
*/
public class ChunkProviderServerHook extends ChunkProviderServer {
@Setter
private static int distance = FactionConfiguration.getConfiguration().spawnProtection;
public ChunkProviderServerHook(WorldServer worldserver, IChunkLoader ichunkloader, IChunkProvider ichunkprovider) {
super(worldserver, ichunkloader, ichunkprovider);