Skip to content

Instantly share code, notes, and snippets.

View awhite92's full-sized avatar
🏴‍☠️
"The rats have prevailed." — The New York Times

Aaron White awhite92

🏴‍☠️
"The rats have prevailed." — The New York Times
View GitHub Profile
@awhite92
awhite92 / example.css
Last active May 24, 2021 20:37
animating visibility
.card .icon {
visibility: hidden;
opacity: 0;
transform: translate(0, 20px);
transition: all 0.5s ease-out 0s, visibility 0s 0.5s;
}
.card:hover .icon {
visibility: visible;
opacity: 1;
transform: translate(0,0);
@awhite92
awhite92 / functions.php
Created July 17, 2020 18:45
Fix for WordPress archive pagination not working.
/**
* Fix pagination on archive pages.
* Change 'news' (in both places) to the archive that is having the redirect problem.
*/
function wss_pagination_rewrite() {
add_rewrite_rule( 'news/page/?([0-9]{1,})/?$', 'index.php?category_name=news&paged=$matches[1]', 'top' );
}
add_action( 'init', 'wss_pagination_rewrite' );
@awhite92
awhite92 / package.json
Created July 7, 2020 20:08
Legacy Project Fix. add to package.json then run `yarn` - ReferenceError: primordials is not defined
{
// Your current package.json contents
"resolutions": {
"graceful-fs": "4.2.3"
}
}