This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.earth2me.essentials.providers; | |
import com.earth2me.essentials.IEssentials; | |
public class ProviderFactory<T extends Provider> { | |
private IEssentials ess; | |
private String providerType; | |
private Iterable<Class <? extends T>> availableProviders; | |
public ProviderFactory(IEssentials ess, Iterable<Class <? extends T>> availableProviders, String providerType) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#jenkins-home-link { | |
display: block; | |
background: url("https://i.imgur.com/SCpSc0e.png") 0 0 no-repeat; | |
float: right; | |
top: 2px; | |
height: 38px; | |
width: 220px; | |
} | |
#jenkins-head-icon { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import route, run | |
import subprocess, socket, os, glob, yaml | |
# load config | |
with open('config.yml', 'r') as config_file: | |
config = yaml.load(config_file) | |
base_path = config['base-path'] | |
bind_addr = config['bind-addr'].split(':') | |
bind_host = bind_addr[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Field listenerMap; | |
Runnable relogRunnable; | |
ErrorHandler errorHandler; | |
public void loadSkype() { | |
try { | |
listenerMap = SkypeEventDispatcher.class.getDeclaredField("listeners"); | |
listenerMap.setAccessible(true); | |
} catch (NoSuchFieldException e) { | |
e.printStackTrace(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.arkhamnnetwork.libs.item; | |
import net.minecraft.server.v1_8_R3.NBTTagCompound; | |
import net.minecraft.server.v1_8_R3.NBTTagList; | |
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack; | |
import org.bukkit.inventory.ItemStack; | |
public class Glow { | |
public static ItemStack addGlow(ItemStack item){ | |
net.minecraft.server.v1_8_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$status = get-service -name "XTU3SERVICE" | Select-Object {$_.status} | format-wide | |
if ($status -ne "Running") { start-service -name "XTU3SERVICE"} | |
& 'C:\Program Files (x86)\Intel\Intel(R) Extreme Tuning Utility\Client\XTUCli.exe' -t -id 34 -v -100.58593750000 | |
sleep 3 | |
& 'C:\Program Files (x86)\Intel\Intel(R) Extreme Tuning Utility\Client\XTUCli.exe' -t -id 83 -v -100.58593750000 | |
sleep 4 | |
stop-process -id $PID -force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get install -y cpufrequtils | |
numcores=$(expr `cpufreq-info | grep -c driver` - 1) | |
for f in `seq 0 $numcores` | |
do | |
sudo cpufreq-set -g performance -c $f | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install zram | |
wget -O - https://gist.githubusercontent.com/vemacs/6ec150e86329f3151b52/raw/af5d82461e62ed1033b2a58e0e960eb3bea8d4f1/debian-install-zram.sh | bash | |
# Other packages | |
apt-get install -y netfilter-persistent git tmux emacs-nox htop python-pip python-dev libssl-dev sudo | |
# Java 8 | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
not_root() { | |
echo "ERROR: You have to be root to execute this script" | |
exit 1 | |
} | |
zram_exists() { | |
echo "ERROR: /etc/init.d/zram already exists" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("deprecation") | |
private UUID getIdFromBukkit(String name) { | |
Bukkit.getLogger().warning("Using potentially blocking Bukkit UUID lookup for: " + name); | |
UUID uuid = Bukkit.getOfflinePlayer(name).getUniqueId(); | |
// If the uuid matches the fake one from Bukkit, return it as fake | |
if (uuid.equals(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)))) { | |
return null; | |
} else { | |
return uuid; | |
} |