Skip to content

Instantly share code, notes, and snippets.

@ArcHound
ArcHound / init.lua
Created April 18, 2025 12:54
Neovim init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
@ArcHound
ArcHound / substack_gist_fixer.js
Created March 1, 2025 19:20
Fix Substack Gist embedding by pasting this into the console
// source: https://github.com/Maluen/code-medium/issues/11#issuecomment-2192400621
// I am taking it for archival and convenience - I've done no changes
var _open = XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function (method, URL) {
var _onreadystatechange = this.onreadystatechange,
_this = this;
_this.onreadystatechange = function () {
if (_this.readyState === 4 && _this.status === 200 && ~URL.indexOf('api/v1/github/gist')) {
try {
@ArcHound
ArcHound / shannon_test.py
Last active March 2, 2025 13:24
Shannon Entropy Test File
#!/usr/bin/env python3
from api_client import Client
if __name__ == "__main__":
username = "[email protected]"
password = "I7Xr+HMvS9fjii5GTa8IZLH4yaP4B2UDIPAg9lgh3u4="
pin = "336351"
client = Client()
@ArcHound
ArcHound / shannon.py
Created February 24, 2025 21:15
Shannon Entropy Secret Detections
#!/usr/bin/env python3
from math import log
SECRET_THRESHOLD = 4
FILENAME = "test.py"
def word_entropy(s: str):
"""Calculates Shannon entropy for the word *s*"""
#!/usr/bin/env python3
import math
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver import ActionChains