Skip to content

Instantly share code, notes, and snippets.

View jordanmack's full-sized avatar

Jordan Mack jordanmack

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jordanmack on github.
* I am jordanmack (https://keybase.io/jordanmack) on keybase.
* I have a public key ASBF5d6_IBpXhRdTO3g_fw0uskqryGnd98JANb8oG65waAo
To claim this, I am signing this object:
@jordanmack
jordanmack / zencash.sh
Last active September 20, 2017 10:00
Configure Server and Install ZenCash
#!/usr/bin/env bash
# Quit on any error.
set -e
# Require superuser.
if [[ $EUID > 0 ]]; then
echo "This script requires root or sudo."
exit 1
fi
@jordanmack
jordanmack / getGasPrice.py
Created June 3, 2018 21:00
A simple Python script to determine the Ethereum gas price that should be used by utilizing the EthGasStation.info API. I use this in simple automation scripts and find it to be more reliable for predicting a safe gas price during congested periods.
#!/usr/bin/env python3
import json
import math
import requests
DEFAULT = 15
MODIFIER = 2
try:
@jordanmack
jordanmack / gist:2bb8840537db4448ba563ab460b0322b
Created August 25, 2018 04:50
Peepeth: Unhide all content without having to click.
const reveal = function()
{
jQuery("a.nsfwShow").click();
jQuery("a.politicsShow").click();
};
reveal();
setInterval(reveal, 500);
@jordanmack
jordanmack / gist:9373f9b922e906eeffb0cbff0cefe57e
Created August 25, 2018 04:51
Peepeth: Bookmarklet code to unhide all content without having to click.
javascript:(function()%7Bconst%20reveal%20%3D%20function()%7BjQuery(%22a.nsfwShow%22).click()%3BjQuery(%22a.politicsShow%22).click()%3B%7D%3Breveal()%3BsetInterval(reveal%2C%20500)%7D)()
@jordanmack
jordanmack / user.js
Last active October 23, 2018 06:33
Peepeth Enhancer is a user script that adds several new features to Peepeth. To use this user script install you will need the Tampermonkey plugin. https://tampermonkey.net/
// ==UserScript==
// @name Peepeth Enhancer
// @namespace https://github.com/jordanmack/PeepethEnhancer
// @version 0.3.0
// @description Peepeth Enhancer is a collection of scripts that add several new features to Peepeth.
// @author Jordan Mack (jordanmack.info)
// @match https://peepeth.com/*
// @grant none
// ==/UserScript==
#!/usr/bin/env python3
def format_binary(i):
s = bin(i)
s = s.replace("0b", "")
return s
def gray_code(n):
return n ^ (n >> 1)