Skip to content

Instantly share code, notes, and snippets.

Gettin ma tech awn

Mark Hewitt yayMark

Gettin ma tech awn
  • Perth, Western Australia
Block or report user

Report or block yayMark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
git stash list
echo "Enter stash number to rename"
read stash_number
echo "Enter new name"
read new_name
echo "$stash_name"
markhowellsmead / css-mixblendmode.js
Created Sep 28, 2016
Detect browser support for CSS' mix-blend-mode using JavaScript
View css-mixblendmode.js
if (typeof window.getComputedStyle(document.body).mixBlendMode === 'undefined') {
document.documentElement.className += " mix-blend-mode-no";
View WordPress Remove About Yourself Box - User Profile
// Callback function to remove default bio field from user profile page & re-title the section
// ------------------------------------------------------------------
// Thanks to original code found here:
// More reference:
// Alternate examples:
function remove_bio_box($buffer){
$buffer = str_replace('<h3>About Yourself</h3>','<h3>User Password</h3>',$buffer);
$buffer = preg_replace('/<tr class=\"user-description-wrap\"[\s\S]*?<\/tr>/','',$buffer,1);
tomazzaman /
Last active Mar 18, 2020
Gulp workflow for WordPress theme development

Gulp workflow for WordPress theme development


In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php, just make sure to insert it only on development environment:

<script>document.write('<script src="http://' + ( || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
magicznyleszek /
Last active Mar 29, 2020
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
View wordlist.txt
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
View WooCommerce: How To Get WooCommerce Page IDs
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
maniaks / add_setting_cpt.php
Created Sep 10, 2013
WordPress: Add Settings page to custom post type
View add_setting_cpt.php
//Example from Codex page :
//Add this in your functions.php file, or use it in your plugin
add_action('admin_menu', 'register_my_custom_submenu_page');
function register_my_custom_submenu_page() {
add_submenu_page( 'edit.php?post_type=book', 'My Custom Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-custom-submenu-page', 'my_custom_submenu_page_callback' );
grenade /
Last active Apr 2, 2020
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "" -f ~/.ssh/mozilla_rsa
scottnath / gist:4003391
Created Nov 2, 2012
wordpress & gravity forms: Giving Editors Access to Gravity Forms
View gist:4003391
//Giving Editors Access to Gravity Forms
function add_grav_forms(){
$role = get_role('editor');
You can’t perform that action at this time.