Skip to content

Instantly share code, notes, and snippets.

View codekipple's full-sized avatar

codekipple

View GitHub Profile
<?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">';
@codekipple
codekipple / gist:ea3080d0775a54019447be8148c01e8c
Last active July 24, 2020 00:15
Change mac values for InitialKeyRepeat and KeyRepeat
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
@codekipple
codekipple / gist:9d200983693baf118eaccc096e25684a
Created June 7, 2019 12:36
Remove folders and files from git history
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
@codekipple
codekipple / 5.gif
Last active April 10, 2019 23:31
a long one instead.
5.gif
@codekipple
codekipple / 4.gif
Last active April 10, 2019 23:32
so I wrote
4.gif
@codekipple
codekipple / 3.gif
Last active April 10, 2019 23:32
short stylesheet,
3.gif
@codekipple
codekipple / 2.gif
Last active April 10, 2019 23:32
to write a
2.gif
@codekipple
codekipple / 1.gif
Last active April 10, 2019 23:32
have time
1.gif
@codekipple
codekipple / 0.gif
Last active April 10, 2019 23:32
I didn't
0.gif