Skip to content

Instantly share code, notes, and snippets.

View ddurst's full-sized avatar

David Durst ddurst

View GitHub Profile
@ddurst
ddurst / find_dupes.py
Created September 29, 2021 15:41
Old script for finding duplicate files by name in a directory tree
#!/usr/bin/python
import errno, sys, os
DEBUG = 0
"""
def make_sure_path_exists(path):
if DEBUG:
print path
@ddurst
ddurst / pvf-custom-js-v2.js
Last active September 15, 2020 12:50
Custom JS code for PVF.com with purcellville stand preorders
<hr />
<script>
/* Disable store except for open-for-shopping window */
let DEBUG = false;
let activeModes = getShoppingWindowMode();
verifyFutureShoppingWindowMode();
if (activeModes.length > 0) { // disable disabling
let css = document.getElementById('wp-custom-css');
css.setAttribute('media', "max-width: 1px");
let baseURL = 'https://potomacvegetablefarms.com/';
@ddurst
ddurst / ravelry.styl
Last active June 27, 2020 18:50
Tame ravelry.com
@-moz-document domain("ravelry.com") {
/*
The recent redesign of ravelry.com has some serious issues. The goal of this userscript -- for use with the
Stylus browser extension (written in and for Firefox, but easily transferrable to Chrome) -- is to retain
the major design choices (colors, layout, etc), but to remove the jarring elements of the design.
In proper, mobile-first design, the site would have been built to be accessible like HTML 1.0 -- but I have
not tried to use this site with no CSS applied. That mountain is too high. Instead, I tried to use just CSS
to improve the user experience and reduce the visual and cognitive load.
@ddurst
ddurst / pvf-custom-css
Last active May 18, 2020 01:06
Custom CSS for PVF.com
/* navigation controls: only available when store is enabled */
.woocommerce-menu-container {
display: none !important;
position: absolute;
}
#toggle-cart {
display: none !important;
position: absolute;
}
#which-markets-open-notice,
@ddurst
ddurst / pvf-custom-js
Last active July 21, 2020 18:33
Custom JS code for PVF.com
<hr />
<script>
/* Disable store except for open-for-shopping window */
let check = getShoppingWindowMode();
verifyFutureShoppingWindowMode();
if (check > 0) { // disable disabling
let css = document.getElementById('wp-custom-css');
css.setAttribute('media', "max-width: 1px");
} else { // disabling, so forcibly disable
if (document.body.classList.contains("woocommerce-page")) {
@ddurst
ddurst / open-bug-ids-settings
Created January 21, 2020 16:35
Open Bug IDs settings
[Monitor](https://github.com/mozilla/blurts-server/); [Lockwise Android](https://github.com/mozilla-lockwise/lockwise-android/); [Lockwise iOS](https://github.com/mozilla-lockwise/lockwise-ios/)
@ddurst
ddurst / stylus-show-trello-labels
Created January 21, 2020 16:09
Stylus style to show labels on trello by default
@-moz-document domain("trello.com") {
.body-card-label-text .card-label.mod-card-front {
height: auto !important;
line-height: 1.6 !important;
padding: 0 2% 0 2% !important;
max-width: 90% !important;
}
}
@ddurst
ddurst / styles-gdoc-gdrive-prettier
Last active January 21, 2020 16:09
Stylus style to make gdocs and gdrive look better
@-moz-document domain("drive.google.com") {
* {
font-family: Helvetica, Arial, sans-serif !important;
}
}
@-moz-document domain("docs.google.com") {
#docs-title-widget,
.left-sidebar-container,
.navigation-widget-hat-title {
@ddurst
ddurst / stylus-bugzilla-trees-in-red-and-black
Last active January 6, 2022 19:56
Stylus style to show tree view calling out still-open bugs and overall make things look better
@-moz-document domain("bugzilla.mozilla.org") {
/* undo dark theme auto-application */
@media screen and (prefers-color-scheme: dark) {
:root {
/** Accent Colors */
--accent-color-red-1: 220, 40, 30 !important;
--accent-color-red-2: 194, 35, 27 !important;
--accent-color-green-1: 40, 120, 40 !important;
--accent-color-blue-1: 0, 108, 191 !important;
--accent-color-blue-2: 0, 94, 166 !important;
@ddurst
ddurst / stylus-github-helvetica-please
Created January 21, 2020 16:05
Stylus style to force github to use Helvetica
@-moz-document domain("github.com") {
body,
.markdown-body {
/* font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";*/
font-family: BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
}