Skip to content

Instantly share code, notes, and snippets.

grappler /
Created Feb 21, 2021 — forked from RichardBronosky/
Use TouchID for sudo on modern MacBook Pro machines
# curl -sL | bash
# This script is ready to copy-paste in whole, or just the line above (without the leading #)
# Use TouchID for sudo on modern MacBook Pro machines
# This script adds a single line to the top of the PAM configuration for sudo
# See: for more info.
grappler /
Last active Nov 22, 2019 — forked from neverything/
Install composer and wp-cli on hostings with SSH access.
View - Install composer & wp-cli

SSH into your server and stay in the home directory of the user. Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.

Use bin folder in $HOME for user scriptsr

For the commands to be loaded from the bin directory run echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc. For the new config to be used run source ~/.bashrc or close and reopen your SSH session.


grappler / woocommerce-show-products-ids.php
Created Sep 20, 2018 — forked from corsonr/gist:5947181
Show WooCommerce product ID in a custom column on products list page
View woocommerce-show-products-ids.php
* Plugin Name: WooCommerce - Show products IDs
* Plugin URI:
* Description: Adds a new columns to products list page to display product IDs
* Version: 1.0
* Author: Remi Corson
* Author URI:
* Requires at least: 3.5
* Tested up to: 3.5
View load-child-theme.php
* Load parent theme translations
add_action( 'after_setup_theme', 'woo_load_textdomain', 10 );
function woo_load_textdomain(){
$locale = get_locale();
$domain = 'woothemes';
View color.js
View settings.php
* Plugin Name: My Plugin
* Plugin Description: Settings API Demo
* Text Domain: my-plugin
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
grappler / functions.php
Created Nov 18, 2012 — forked from isGabe/functions.php
Auto versioning of CSS/JS files in WordPress
View functions.php
Auto-version CSS & JS files, allowing for cache busting when these files are changed.
Place in functions.php or wherever you are enqueueing your scripts & styles
Avoids using query strings which prevent proxy caching
Adjust paths based on your theme setup. These paths work with Bones theme