A bunch of things I find useful for WebDev
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
<?php | |
/** | |
* Shop/archives: wrap the product image/thumbnail in a div. | |
* | |
* The product image itself is hooked in at priority 10 using woocommerce_template_loop_product_thumbnail(), | |
* so priority 9 and 11 are used to open and close the div. | |
*/ | |
add_action( 'woocommerce_before_shop_loop_item_title', function(){ | |
echo '<div class="imagewrapper">'; |
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
The default values for InitialKeyRepeat and KeyRepeat are:- | |
InitialKeyRepeat: 25 | |
KeyRepeat: 2 | |
# Show InitialKeyRepeat and KeyRepeat values | |
defaults read NSGlobalDomain InitialKeyRepeat | |
defaults read NSGlobalDomain KeyRepeat | |
# Pre Catalina - Set values for InitialKeyRepeat and KeyRepeat | |
defaults write NSGlobalDomain InitialKeyRepeat -int 12 |
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
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
echo node_modules/ >> .gitignore | |
git add .gitignore | |
git commit -m 'Removing node_modules from git history' | |
git gc | |
git push origin master --force | |
credit: https://stackoverflow.com/a/17824718/1589726 |
NewerOlder