Skip to content

Instantly share code, notes, and snippets.

@PaulBGD
PaulBGD / lint.js
Last active Nov 11, 2015
TypeScript linter
View lint.js
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 Oct 10, 2015
Raven bindings for typescript
View raven.d.ts
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 Sep 27, 2015
CaaS README
View README.md

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
View Letters.js
(function() {
var letters = letters = {
'A': [
[, 1],
[1, , 1],
[1, , 1],
[1, 1, 1],
[1, , 1]
],
'B': [
@PaulBGD
PaulBGD / gist:4a637a871b8e0a67e967
Created Jul 16, 2015
Put this in your address bar to head to Chester's Skype
View gist:4a637a871b8e0a67e967
Chester is currently too busy to handle your request. Check out this dedicated Skype room!
skype:?chat&blob=DwqHBv-h_KtVeIuYMHt_7265uibJE7tUv9v2q_VIafmSxI7kJye06V0pk4qQxzo-ZXDDWkEF3A
View Implementations.java
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 Jun 20, 2015
Check if someone is using adblock
View noadblock.js
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
Find CraftPlayer ping
View Ping.java
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) {
View ChunkProviderServerHook.java
/**
* @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);
View keybase.md

Keybase proof

I hereby claim:

  • I am PaulBGD on github.
  • I am paulbgd (https://keybase.io/paulbgd) on keybase.
  • I have a public key whose fingerprint is 660B 9BC1 3C2B C174 3A5A D16D 9692 73F3 DD96 15FE

To claim this, I am signing this object: