Skip to content

Instantly share code, notes, and snippets.

View kmwalsh's full-sized avatar
🤖

Kate Walsh kmwalsh

🤖
View GitHub Profile
@kmwalsh
kmwalsh / gist:2f2f3e0d46681bae34aedc31e65a0115
Created March 8, 2024 19:44
Fix inaccurate comment counts across a WP multisite via wp cli
/**
* Fix inaccurate comment counts across a WP multisite
*
*/
class Multisite_Comments_Fix {
/**
* Class construction.
*/
@kmwalsh
kmwalsh / slack-analgesic.css
Last active February 26, 2024 17:44
Make Slack less painful.
/* ==UserStyle==
@name slack.com - 6/6/2023, 6:08:37 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A Slack in-browser customization style
@author github.com/kmwalsh
==/UserStyle== */
@-moz-document domain("app.slack.com") {
* {
@kmwalsh
kmwalsh / automatically prepend ticket number to commit message
Last active December 11, 2023 17:40
automatically prepend ticket number to commit message
* mv .git/hooks/commit-msg.sample .git/hooks/commit-msg
* chmod ug+x .git/hooks/commit-msg
paste the desired script into commit-msg
Use this template when reporting a security vulnerability in Slack.
It can be inefficient to have to dig through a thread to figure out
what to do next. Presenting all of the information in the initial
disclosure message is ideal. Additionally, it is harrowing to
receive notification of a security vulnerability and can cause much
strife and chaos and confusion. This prevents some emotional chaos.
---
**Plugin:** (link to plugin repo)
@kmwalsh
kmwalsh / gist:863415ac6b9efa8f9e69ff2557c7cbbf
Last active June 29, 2023 18:21
Official guide to seriously official development slang
yeet = deploy. Use example: let’s yeet this to production.
yolo = do it on live. Use example: I’ma yolo that change – no staging.
yoinked/yoinkerized = pulled repo. Use example: I'ma yoinkerize the latest changes from main.
glow up = redesign. Use example: Their site is from 2010, needs a total glow up.
snack = clever piece of code. Use example: That function you wrote is a lil snack.
alias install-wp="curl -0 https://wordpress.org/latest.zip > latest.zip && unzip latest.zip && mv wordpress/* ./ && rm latest.zip && rm -r wordpress"
https://drewdevault.com/2018/07/02/Email-driven-git.html
Date: Mon, 11 Jun 2018 14:19:22 -0400
From: Drew DeVault <sir@cmpwn.com>
To: Gregory Mullen <omitted>
Subject: Re: [PATCH 2/3 todo] Filter private events from events feed
On 2018-06-11 9:14 AM, Gregory Mullen wrote:
> diff --git a/todosrht/alembic/versions/cb9732f3364c_clear_defaults_from_tickets_to_support_.py b/todosrht/alembic/versions/cb9732f3364c_clear_defaults_from_tickets_to_support_.py
> -%<-
@kmwalsh
kmwalsh / yeet
Last active March 24, 2023 00:27
offload (yeet) "which front end build tool was it again?" from brain forever
#!/bin/bash
buildTools=("gulp", "gulp watch", "grunt", "grunt watch", "npm run build", "npm run watch", "npx webpack")
for t in ${buildTools[@]};
do
$t
echo yeet $t
done
@kmwalsh
kmwalsh / gist:40728e77d88b7fb2d9a0fd048d564c23
Created August 12, 2022 21:18
self-updating modified plugin
#!/bin/bash
# copy patches and update.sh to temporary directory
cp -r ./patches ~/tmp/wp-security-audit-log
cp -r ./update.sh ~/tmp/wp-security-audit-log
# get latest and unzip
curl -O https://downloads.wordpress.org/plugin/wp-security-audit-log.latest-stable.zip
unzip wp-security-audit-log.latest-stable.zip
@kmwalsh
kmwalsh / gist:47f65c2d8790ff914f45cd7866c1859f
Created July 19, 2021 23:04
px to em with rem support
@function em($pixels, $context: 16) {
@if ( comparable($pixels, 1px)) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@return $pixels / $context * 1em;
}