Skip to content

Instantly share code, notes, and snippets.

View SteveHere's full-sized avatar
💭
Looking for work

Steve SteveHere

💭
Looking for work
View GitHub Profile
@SteveHere
SteveHere / epitaph-hide-dead-civs.user.js
Last active February 2, 2024 18:04
Epitaph - Add 'Hide Civ' button - Tampermonkey script
// ==UserScript==
// @name Add 'Hide Civ' Button
// @version 0.1
// @namespace https://gist.github.com/SteveHere/1a19df5242802df3edcc7d34d5c62523
// @description Injects a 'Hide Civ' button for each dead civ
// @author SteveHere
// @match https://mkremins.github.io/epitaph/
// @icon none
// @grant none
// ==/UserScript==
@SteveHere
SteveHere / restore-blue-bird-logo.user.js
Last active September 15, 2023 07:03
Restore Original Blue Bird Twitter Logo - Tampermonkey script
// ==UserScript==
// @name Restore Original Blue Bird Twitter Logo
// @version 0.2
// @namespace https://gist.github.com/SteveHere/2e6cd82d833156fbd76089732f5429c3
// @description Restores the original blue bird Twitter logo (Adapted from https://raw.githubusercontent.com/cygaar/old-twitter)
// @author SteveHere
// @match https://twitter.com/*
// @icon none
// @grant none
// ==/UserScript==
@SteveHere
SteveHere / log_x_axis.js
Created March 22, 2023 03:08
Tampermonkey script for Polygonscan's gas tracker graph
// ==UserScript==
// @name Logarithmic X-axis
// @version 0.1
// @description Logarithmic X-axis for Polygonscan's gas tracker graph
// @match https://polygonscan.com/gastracker*
// @author SteveHere
// @grant none
// ==/UserScript==
const lower_bound = 25, upper_bound = 1000;
@SteveHere
SteveHere / tmScript.js
Last active February 14, 2023 00:12
Tampermonkey script for https://fragile.city
// ==UserScript==
// @name Sorted list + stats
// @version 0.3
// @description Sorts the cities + gives pollution & population stats
// @author SteveHere
// @match https://fragile.city/
// @icon https://www.google.com/s2/favicons?sz=64&domain=fragile.city
// @grant none
// ==/UserScript==
@SteveHere
SteveHere / te_to_rpym_replacer.js
Created December 3, 2021 08:56
"The economy" -> "Rich people's yacht money" word replacer
// ==UserScript==
// @name "The economy" to "Rich people's yacht money"
// @version 0.1
// @author SteveHere
// @match https://*.reddit.com/*
// @grant none
// ==/UserScript==
// Brought up by: https://twitter.com/onyxaminedlife/status/1334578466851852290
// This is a simple Tampermonkey script in response.
// This should work almost anywhere, as it just looks for text.
@SteveHere
SteveHere / fib.py
Created November 8, 2021 02:52
Matrix nth-term Fibonacci calculator benchmark
import time
def time_me(func):
def wrap(*arg):
start = time.monotonic_ns()
r = func(*arg)
end = time.monotonic_ns()
print(f"{func.__name__} ({(end - start) / 1000000} ms)")
return r
@SteveHere
SteveHere / astar.py
Created October 25, 2021 06:20 — forked from jamiees2/astar.py
A* Algorithm implementation in python.
# Enter your code here. Read input from STDIN. Print output to STDOUT
class Node:
def __init__(self,value,point):
self.value = value
self.point = point
self.parent = None
self.H = 0
self.G = 0
def move_cost(self,other):
return 0 if self.value == '.' else 1
@SteveHere
SteveHere / keyservers.md
Created April 12, 2021 02:27 — forked from rjhansen/keyservers.md
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@SteveHere
SteveHere / formProgress.js
Last active December 29, 2020 14:28 — forked from adactio/formProgress.js
Show a progress bar with every form that has a method of POST. Particularly nice if there's a file upload involved.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0/
((win, doc)=>{ 'use strict';
[...doc.querySelectorAll('form[method="post"]')].forEach((formElement)=>{
function ajax (elem) {
let progressBar = Object.assign(doc.createElement('progress'), {max:100, value:0});
formElement.appendChild(progressBar);
let url = elem.action, xhr = new XMLHttpRequest();
xhr.open(elem.method, url, true);
xhr.onload=(ev)=>{ win.location = url; };
000(023Rb|001Rb)
001(017La|002Rb)
002(021La|003Rb)
003(021La|004La)
004(009Rb|005Lb)
005(004Ra|005La)
006(008La|007La)
007(009Rb|007La)
008(009Ra|008La)
009(010Ra|026Ra)