Skip to content

Instantly share code, notes, and snippets.

View ducc's full-sized avatar

Joe Burnard ducc

  • UK
View GitHub Profile
package de.zh32.slp;
import com.google.gson.Gson;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
@ducc
ducc / SimpleScoreboard.java
Last active August 29, 2015 14:25 — forked from mkotb/SimpleScoreboard.java
Non-flickering scoreboard implementation; create scoreboards with ease.
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.*;
import java.util.*;
@ducc
ducc / Windows10-Setup.ps1
Last active August 29, 2015 14:26 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@ducc
ducc / Bot prefixes.md
Last active December 13, 2015 22:17
A collection of prefixes that each bot uses for commands.

Bot prefixes:

  • spongybot: #
  • wee.bot: `
  • beta_bot: !
  • guster.conch: -
  • chester.bot.v2: $
  • infodousbot: ~
  • ptp.bot: .
  • pangeabot: @
  • phobiaknown: %
public abstract class CommandExecutor {
private final String command, permission; // you can group variables of the same type together like this
private final boolean console, player;
private final int length;
/*
Instantiating the variables inside of the constructor instead of using a setter. If you do not want all of these
to be set (e.g. if some are optional) you can have multiple constructors.
*/
@ducc
ducc / CommandBus.java
Last active March 5, 2016 20:11
Consumer based command system
import java.util.*;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Consumer;
public class CommandBus {
private final Map<String, List<Consumer<String[]>>> handlers = new HashMap<>();
private final ReadWriteLock lock = new ReentrantReadWriteLock();
package main
import (
"reflect"
)
type MyEnum struct {
SOME_VALUE string
SOME_OTHER_THING string
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- this section is details about your project -->
<groupId>me.monitor</groupId>
<artifactId>monitoringbotv04</artifactId>
<version>1.0</version> <!-- this is the version of your project, can be set to anything -->

Keybase proof

I hereby claim:

  • I am sponges on github.
  • I am sponges (https://keybase.io/sponges) on keybase.
  • I have a public key whose fingerprint is 61CA 9260 0F91 EA95 A4B4 DA4E BBD7 7FAD ABE2 B9EA

To claim this, I am signing this object:

i = 0
i.something = 51
i.doIt = {
// print hello world
}
i.doIt.myProperty = 913