Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
Working hard reviewing and deploying code

Scott Kingsley Clark sc0ttkclark

🍕
Working hard reviewing and deploying code
View GitHub Profile
@sc0ttkclark
sc0ttkclark / 0-README.md
Last active Jul 29, 2022
Toolbox WebStorm.app Mac integration with Tower.app for diff and merge
View 0-README.md

Toolbox WebStorm.app Mac integration with Tower.app for diff and merge

How to use this

  1. Add CompareTools.plist and webstorm-toolbox.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory. You may need to mkdir ~/Library/Application\ Support/com.fournova.Tower3/CompareTools if the folder does not already exist
  2. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/webstorm-toolbox.sh
  3. Go into Tower.app Preference > Git Config > Select "WebStorm (Toolbox)" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"

Other variations

@sc0ttkclark
sc0ttkclark / 0-README.md
Last active Jul 29, 2022
Toolbox PhpStorm.app Mac integration with Tower.app for diff and merge
View 0-README.md

Toolbox PhpStorm.app Mac integration with Tower.app for diff and merge

How to use this

  1. Add CompareTools.plist and phpstorm-toolbox.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory. You may need to mkdir ~/Library/Application\ Support/com.fournova.Tower3/CompareTools if the folder does not already exist
  2. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/phpstorm-toolbox.sh
  3. Go into Tower.app Preference > Git Config > Select "PhpStorm" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"

Other variations

@sc0ttkclark
sc0ttkclark / my-pmpro-set-user-display-name-as-first-last-name.php
Last active Mar 11, 2022
Automatically update the display name to be set as the first/last name when the user is registered or the profile is saved or during checkout.
View my-pmpro-set-user-display-name-as-first-last-name.php
<?php
/**
* Automatically update the display name to be set as the first/last name when the user is registered or the profile is saved.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules-full.php
Created Mar 2, 2022
Reset the Cron Schedules for Paid Memberships Pro. The single-use version can be found at: https://gist.github.com/sc0ttkclark/bd319a47656b786ccee3eca6f2dc4a9a and the PMPro admin page only version can be found at: https://gist.github.com/sc0ttkclark/e11691d6c5a278662e3c694a0bb12e5a
View my-pmpro-reset-cron-schedules-full.php
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro on any page load.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules-single-use.php
Last active Feb 23, 2022
Reset the Cron Schedules for Paid Memberships Pro (single-use run with Code Snippets plugin). The solution that runs on every PMPro Admin page load can be found here: https://gist.github.com/sc0ttkclark/e11691d6c5a278662e3c694a0bb12e5a
View my-pmpro-reset-cron-schedules-single-use.php
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro (single-use run with Code Snippets plugin).
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules.php
Last active Mar 11, 2022
Reset the Cron Schedules for Paid Memberships Pro. The single-use version can be found at: https://gist.github.com/sc0ttkclark/bd319a47656b786ccee3eca6f2dc4a9a
View my-pmpro-reset-cron-schedules.php
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / 0-README.md
Last active Jul 29, 2022
WebStorm.app Mac integration with Tower.app for diff and merge
View 0-README.md

WebStorm.app Mac integration with Tower.app for diff and merge

How to use this

  1. Add CompareTools.plist and webstorm.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory
  2. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/webstorm.sh
  3. Go into Tower.app Preference > Git Config > Select "WebStorm" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"

Other variations

@sc0ttkclark
sc0ttkclark / wordpress-plugins-saved-replies.user.js
Created Feb 9, 2022
WordPress.org plugins and themes topic saved replies Tampermonkey script. Click 'raw' to install it.
View wordpress-plugins-saved-replies.user.js
// ==UserScript==
// @name WordPress.org plugins and themes topic saved replies
// @namespace https://skc.dev/
// @version 0.1
// @description Add saved replies to topic reply forms.
// @author Scott Kingsley Clark
// @match https://wordpress.org/support/topic/*
// @match https://*.wordpress.org/support/topic/*
// @grant none
// ==/UserScript==
@sc0ttkclark
sc0ttkclark / my-pmpro-site-lock-down.php
Last active Feb 2, 2022
Lock the entire PMPro site down for anyone logged out.
View my-pmpro-site-lock-down.php
<?php
/*
* Lock down the site for anyone logged out.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-event-tickets-visibility.php
Created Jan 10, 2022
Restrict access to specific tickets / RSVPs depending on Membership Level. Requires Event Tickets 5.2.3+
View my-pmpro-event-tickets-visibility.php
<?php
/**
* Restrict access to specific tickets / RSVPs depending on Membership Level.
*
* Requires Event Tickets 5.2.3+
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/