Skip to content

Instantly share code, notes, and snippets.

@jmhertlein
jmhertlein / config.yml
Last active August 29, 2015 14:05 — forked from anonymous/config.yml
#The Configuration For Amazon!#
#This Config Will Contain Orders & More#
Amazon:
Players:
danderion:
item: DIAMOND_SWORD
count: 1
everdras:
item: DIAMOND
count: 64
@jmhertlein
jmhertlein / gist:f8fbf66f1109f9ad4cbc
Last active August 29, 2015 14:05
Orders using a Map
public class SomePlugin extends JavaPlugin {
private Map<String, Order> orders;
...
public void onEnable() {
//you'll need to remember to load the config from disk
//something like
//this.orders = getConfig().getMap("Amazon.Players");
this.orders = new HashMap<String, Order>;
Instead of this...
thinger: blah blah at x: 1, y: 1, z: 1
do this:
thinger:
msg: blah blah
x: 1
y: 1
@jmhertlein
jmhertlein / gen_ca.sh
Last active June 18, 2024 19:30
bash script for generating new root SSL CA private key and certificate
#!/bin/bash
##################################################
# for generating your root CA private key and cert
##################################################
ca_name="jmhca"
ca_key_bits="4096"
ca_cert_expire_days="365"
@jmhertlein
jmhertlein / wowl.sh
Created June 5, 2015 06:11
WoW launch script w/ wine for nvidia hardware
#!/bin/bash
WOWPATH="/home/joshua/.wine/drive_c/Program Files (x86)/World of Warcraft"
cd "$WOWPATH"
if [ "$1" == "launcher" ]; then
WINEDEBUG=-all wine "World of Warcraft Launcher.exe"
elif [ "$1" == "kill" ]; then
wineserver -k
import java.util.List;
import java.util.LinkedList;
public class Permute {
public static void main(String[] args) {
for(String s : permute("abcd"))
System.out.println(s);
}
public static List<String> permute(String s) {