Skip to content

Instantly share code, notes, and snippets.

@EliteMasterEric
EliteMasterEric / hash.py
Created November 6, 2016 22:00
Simple perceptual hashing in Python.
# Import the Python Image Library.
from PIL import Image
# Constant values for image locations, etc.
IMAGE_INPUT = "Square.png"
IMAGE_OUTPUT_GRAY = "Gray.png"
IMAGE_OUTPUT_SCALED = "Scaled.png"
IMAGE_OUTPUT_HASH = "Hashed.png"
# The size of the scaled image used for hashing, in pixels.
// ==UserScript==
// @name AutoSkipAdfly (*BROKEN*)
// @namespace MasterEric
// @include http://adfoc.us/serve/?id=*
// @include http://adf.ly/*
// @description Automatically skip ads on adf.ly and adfoc.us
// @version 1
// @grant none
// ==/UserScript==
// ==UserScript==
// @name AutoUsernameMCVote
// @namespace AutoUsernameMCVote
// @include http://minecraft-mp.com/server/*/vote/
// @include http://minecraft-server-list.com/server/*/vote/
// @include http://minecraftservers.org/vote/*
// @include http://topg.org/Minecraft/in-*
// @description Insert Username into fields on Minecraft Voting Sites
// @version 1
// @grant none
// ==UserScript==
// @name AutoLogin
// @namespace MasterEric
// @include http://1.1.1.1/login.html*
// @description Automatically login to OCSGuest.
// @version 1
// @grant none
// ==/UserScript==
setTimeout(function() { submitAction(); }, 1000);
@EliteMasterEric
EliteMasterEric / FlairAccessor.py
Last active August 29, 2015 14:21
Reddit PRAW Flair Statistics
import datetime
import time
import random
import os
import requests.exceptions
import re
import praw
from traceback import format_exc
'''
@EliteMasterEric
EliteMasterEric / SourceMemory.js
Created May 8, 2015 22:16
Source Memory for Screeps
/* This module allows you to store memory in energy sources,
similarly to other objects like spawns and creeps.
It can even by accessed by the source.memory alias!
To use this in your code, add this line to the top of main:
var SourceMemory = require("SourceMemory");
*/
//Creating source memory...
console.log("Creating source memory...");