Skip to content

Instantly share code, notes, and snippets.

View codekipple's full-sized avatar

codekipple

View GitHub Profile
@codekipple
codekipple / jsmc homework part 1
Created March 4, 2011 14:23
javascript master class with Amy Hoy and Thomas Fuchs: Homework part 1
// 1. Write a class to support the following code:
// var thomas = new Person('Thomas');
// var amy = new Person('Amy');
// thomas.name // --> "Thomas"
var Person = function( name ){
this.name = name;
};
var thomas = new Person('Thomas');
var amy = new Person('Amy');
console.log( thomas.name ) // --> "Thomas"
@codekipple
codekipple / gist:2420042
Created April 19, 2012 09:56
WP custom user taxonomies
<?php
// http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress
// http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress#comment-568682
/* class to make it easy to add user taxonomies
* Useage:
* $tax = new User_Taxonomy( array('taxonomy_name'=> 'profession', 'singular_label' => 'Profession', 'plural_label' => 'Professions') );
/*------------------------------------------------------------------------------------------------*/
class User_Taxonomy{
@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
<?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: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 / 0.gif
Last active April 10, 2019 23:32
I didn't
0.gif
@codekipple
codekipple / 1.gif
Last active April 10, 2019 23:32
have time
1.gif
@codekipple
codekipple / 2.gif
Last active April 10, 2019 23:32
to write a
2.gif
@codekipple
codekipple / 3.gif
Last active April 10, 2019 23:32
short stylesheet,
3.gif