Skip to content

Instantly share code, notes, and snippets.

View bhughes339's full-sized avatar

Bill Hughes bhughes339

View GitHub Profile
@bhughes339
bhughes339 / twitch_vod_autopause.user.js
Last active November 21, 2023 21:40
Automatically pause Twitch VODs when window not visible
// ==UserScript==
// @name Twitch VOD Autopause
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Automatically pause Twitch VODs when window not visible
// @author bhughes339
// @match https://*.twitch.tv/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitch.tv
// ==/UserScript==
@bhughes339
bhughes339 / autotypedict.py
Last active August 10, 2023 13:17
Dictionary-like class that automatically tries to typecast each scalar value to a standard type
from collections import UserDict
from collections.abc import Iterable, Mapping
import json
class AutoTypeDict(UserDict):
"""Dictionary-like class that automatically tries to typecast each
scalar value to a standard type.
Values are only typecasted when the `AutoTypeDict` instance is
updated directly, so avoid using type-specific operations on mutable
<template name="Intl Group: Keywords">
Status Date
------------------
Inhouse - Interactions (to TEST):
TEST - Interactions (to LIVE):
LIVE -
TRAIN (RFT) - Interactions (from TEST):
* If there are no Interactions, please enter 'None'
MUST include date & Mnemonic for all Interaction checking
@bhughes339
bhughes339 / pd-binder.php
Last active May 20, 2018 21:41
Tool that converts a csv-formatted MTGO collection to an importable binder of Penny Dreadful cards
<?php
$error = '';
$files = $_FILES['uploaded_file'];
if (!empty($files['tmp_name'])) {
$found = preg_match('/(.*)\.csv$/', $files['name'], $file_matches);
if (!$found) {
$error = 'Error: Wrong format. Please upload a .csv file.';
} else {
$binder_name = $file_matches[1];
$tmpfile = $files['tmp_name'];
#!/usr/bin/env bash
#
# Fix back and forward mouse buttons not working in Spotify on Linux
#
# Designed to be called from xbindkeys or a similar program:
# * Bind the back button to "spotify-mouse-buttons.sh back"
# * Bind the forward button to "spotify-mouse-buttons.sh forward"
#
<html>
<head>
<link rel="stylesheet" href='style.css' >
<link rel="stylesheet" href='/eternal/css/normalize.css' >
<script src="https://whughes.co/jquery/jquery.js"></script>
<script src="methods.js"></script>
</head>
<?php
const FRAME_WIDTH = 300;
const BUTTON_WIDTH = 36;
[Desktop Action vscode-open]
Exec=code -r "%U"
Name=Open in VS Code
Icon=visual-studio-code
[Desktop Entry]
Actions=vscode-open
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all
Type=Service
// ==UserScript==
// @name ReviewMeta Amazon Search
// @namespace http://tampermonkey.net/
// @version 0.1.6
// @description Modify star ratings on Amazon pages based on ReviewMeta scores
// @author bhughes339
// @include https://*.amazon.tld/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==