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.
View JW Player iframe video.html
JW Player Reponsive Video
<script type="text/javascript" src="//">
<style type="text/css">
html, body {
grappler / Gruntfile.js
Last active Oct 5, 2020 / Run this command in the folder to install all of the files needed. `npm install --save-dev`
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
pkg: grunt.file.readJSON('package.json'),
makepot: {
target: {
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.


View class-plugin-name-admin.php
* Plugin Name.
* @package Plugin_Name_Admin
* @author Your Name <>
* @license GPL-2.0+
* @link
* @copyright 2013 Your Name or Company Name
grappler / hide-view.php
Last active Sep 29, 2019
Here is how to remove the "view" button from all three locations for a custom post type.
View hide-view.php
* Hides the 'view' button in the post edit page
function hv_hide_view_button() {
$current_screen = get_current_screen();
View result-embed-responsively.html
.embed-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;
View Responsive HTML5 Video.css
video {
width: 100%;
max-width: 100%;
height: auto;
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
grappler / disable-classic-editor.php
Created May 9, 2018
Remove all traces of the classic editor in Gutenberg
View disable-classic-editor.php
* Removes the classic editor actions links.
add_action( 'admin_init', function() {
// For hierarchical post types.
add_filter( 'page_row_actions', 'gutenberg_remove_classic_editor_links', 10, 2 );
// For non-hierarchical post types.
add_filter( 'post_row_actions', 'gutenberg_remove_classic_editor_links', 10, 2 );