This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ============================================================= | |
* Redirect single post to external link | |
* ============================================================= | |
*/ | |
// this checks to make sure that the function doesn't already exist | |
// if something else in your WP uses a function named redirect_cpt_to_external_link | |
// this check to see whether it exists or not will keep your site from crashing | |
if ( ! function_exists('redirect_cpt_to_external_link') ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fix for keyboard focus states on scroll position or timed based popup implementations | |
// | |
// forces the focus back to the element that was focused prior to popup open | |
// fixes focus bug when faking a click on existing element to bring up a modal window | |
// fixes accessibility issue where the user's focus was changed when the popup shows | |
// | |
/** | |
* Gets keyboard-focusable elements within a specified element | |
* @param {HTMLElement} [element=document] element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
> -%<- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias install-wp="curl -0 https://wordpress.org/latest.zip > latest.zip && unzip latest.zip && mv wordpress/* ./ && rm latest.zip && rm -r wordpress" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Prerequisites: | |
* (1) All of your Gutenberg block Sass is in its own folder, or somewhere separated from the rest of your Sass. `components/blocks/*` is the location of the Sass in this example. | |
* (2) Your variables, mixins, functions, etc. are separated from the rest of your sass. Mixin/variables/function files DO NOT CONTAIN any styling whatsoever -- just definitions. | |
* (3) Do not use the class wp-block anywhere in your custom Gutenblock templates. | |
* | |
* Steps: | |
* 1. Create a new file, editor-style.scss, alongside your style.scss -- do not use an underscore to start filename as this is not a partial | |
* 2. Import your block Sass, your mixins, variables, and functions, as well as any external libraries, in patterns shown below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* mv .git/hooks/commit-msg.sample .git/hooks/commit-msg | |
* chmod ug+x .git/hooks/commit-msg | |
paste the desired script into commit-msg |