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
View git-rename-stash.sh
#!/bin/bash
git stash list
echo "Enter stash number to rename"
read stash_number
echo "Enter new name"
read new_name
stash_name="stash@{${stash_number}}"
echo "$stash_name"
@markhowellsmead
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: https://wordpress.org/support/topic/remove-the-bio-section-from-user-profile
// More reference: http://wordpress.stackexchange.com/questions/49643/remove-personal-options-section-from-profile
// Alternate examples: http://wordpress.stackexchange.com/questions/38819/how-to-remove-biography-from-user-profile-admin-page
if(!function_exists('remove_plain_bio')){
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
tomazzaman / README.md
Last active Mar 18, 2020
Gulp workflow for WordPress theme development
View README.md

Gulp workflow for WordPress theme development

Requirements

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://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@magicznyleszek
magicznyleszek / css-selectors.md
Last active Mar 29, 2020
CSS Selectors Cheatsheet
View css-selectors.md

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
View wordlist.txt
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
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
maniaks / add_setting_cpt.php
Created Sep 10, 2013
WordPress: Add Settings page to custom post type
View add_setting_cpt.php
<?php
//Example from Codex page : http://codex.wordpress.org/Function_Reference/add_submenu_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
grenade / generate-ssh-key.sh
Last active Apr 2, 2020
Correct file permissions for ssh keys and config.
View generate-ssh-key.sh
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@scottnath
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');
$role->add_cap('gform_full_access');
}
add_action('admin_init','add_grav_forms');
You can’t perform that action at this time.