Skip to content

Instantly share code, notes, and snippets.

@ramiwds
ramiwds / wpe_reset_file_permissions.php
Created February 5, 2024 16:21
Reset WP Engine file permissions on the site itself. Requires WPE API to be active for specified account.
<?php
/**
* Rset file permissions on a WPE customer site (without signing-in to a dashboard)
*
* Adapted from the WPE mu-plugin present on all customer sites, at
* `wp-content/mu-plugins/wpengine-common/admin-ui.php`
*/
// Simply hit this hook URL in your desired context:
@ramiwds
ramiwds / gist:563b667739696e1ead747ab70df6bf67
Last active January 18, 2024 20:03
lead-engineer-review-checklist

Lead Engineer Code Review Checklist

General

  • Effective use of guard clauses to prevent unaccounted conditions from proceeding in a method
  • No vague variable names.
  • Reward brevity.
  • Is this the least amount of code possible to accomplish the goal?

Interpersonal

  • Don't allow anything upstream which is below-quality, even if it's legacy code. The exceptions being that the it's third-party, the time to refactor isn't reasonable, or the file spans numerous concerns and isn't practical to refactor.
  • If you don't know the engineer yet, err on the side of politeness and don't assume they have a thick skin forged from years in open-source.
@ramiwds
ramiwds / gethooks
Created April 21, 2023 13:38 — forked from ramiabraham/gethooks
Copy all actions and filters in a plugin and save to a file.
#!/bin/bash
#
# Prints all hooks in a dir to a .log file.
#
# Permissions issues:
# run: chmod +x gethooks
#
# gist: https://gist.github.com/ramiabraham/e8356e00130351ddcbe2c62125e6c52a
#
# Easy usage: