Skip to content

Instantly share code, notes, and snippets.

View 20esaua's full-sized avatar
💭
Installing Arch Linux

20esaua 20esaua

💭
Installing Arch Linux
View GitHub Profile
@20esaua
20esaua / Sanitize.java
Created August 8, 2018 19:01
For sanitizing user input
import java.net.URLEncoder;
import org.apache.commons.lang.StringEscapeUtils;
public class Sanitize {
/*
* @param input the String to be sanitized for use in HTML
* @return the sanitized String
*/
public static String html(Object input) {
@20esaua
20esaua / rps.py
Last active May 29, 2019 18:14
markov chain based rock paper scissors game (in progress)
from random import choice as random
ROCK = 1
PAPER = 2
SCISSORS = 3
out_of = 3
best = out_of -1
MOVES = {