Skip to content

Instantly share code, notes, and snippets.

View justinoboyle's full-sized avatar
Probably drinking coffee.

Justin O'Boyle justinoboyle

Probably drinking coffee.
View GitHub Profile
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class Example {
/**
* A final List<String> of all previous UUIDs generated with
* generateUniqueID(), turned into a string with uuid.toString();
*/
@justinoboyle
justinoboyle / gist:bb5ad3531efd42ef1f3b
Created April 13, 2015 21:52
Truly random double example
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class Example2 {
/**
* A final List<Double> of all previous double generated with
* generateUniqueDouble(), turned into a string with Double.valueOf(d);
*/
@justinoboyle
justinoboyle / StatusCode.java
Created April 18, 2015 04:00
An enum class containing all HTTP Status Codes complete with definitions!
/**
*
* @author Programming: Justin (http://www.github.com/ArrayPro) and
* Information/Documentation:
* http://www.w3.org/Protocols/HTTP/HTRESP.html
* @see Feel free to use this software in your own programs, but please keep the
* credits shown here!
*/
public enum StatusCode {
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.UUID;
import net.minecraft.server.v1_8_R1.AttributeInstance;
mysql:
address: "localhost"
port: 3306
database: "your-app-name"
username: "user"
password: "pw"
@justinoboyle
justinoboyle / BungeeTalk.java
Created August 10, 2015 20:55
Talk to BungeeCord easily!
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.messaging.PluginMessageListener;
import com.google.common.collect.Iterables;
import com.google.common.io.ByteArrayDataInput;
// Solution for https://xss-game.appspot.com/level6
alert(1);
var p = [];
function c(x) { return document.getElementsByClassName(x); }
function rl(f) { setTimeout(f, 20); }
var li = c("comment-header");
for(var i in li) {
if(li[i].innerHTML && li[i].innerHTML.includes("TheArrayPro"))
p.push(i);
}
li = c("sprite_like");
for(var i in p)
@justinoboyle
justinoboyle / webExec.sh
Last active December 9, 2015 02:42
webExec.sh for Bash
#!/bin/bash
alias webexec='function _webexec() { wget $1 -O - | sh}; _webexec';
echo webExec installation complete
javascript:e="your_url_here";t=function(){};d=document,b=d.childNodes;history.pushState("","",e);n=new XMLHttpRequest;n.onreadystatechange=function(){if(4==n.readyState){for(e=b.length-1;e>=0;)d.removeChild(b[e--]);d.write(n.responseText),t()}},n.open("GET",e,!0),n.send(null);