Skip to content

Instantly share code, notes, and snippets.

View ramiwds's full-sized avatar
💭
🎸

rami ramiwds

💭
🎸
  • https://github.com/WebDevStudios
  • ZZ-9 Plural Z Alpha
View GitHub Profile
{
// Place your snippets for php here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@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.
@IlanVivanco
IlanVivanco / cache.php
Last active February 5, 2024 16:08
Clear all possible WP cache systems
<?php
if ( ! function_exists( 'lets_clear_cache' ) ) {
function lets_clear_cache() {
// WP Rocket
if ( function_exists( 'rocket_clean_domain' ) ) {
rocket_clean_domain();
}
// W3 Total Cache : w3tc
@ramiabraham
ramiabraham / gethooks
Last active April 21, 2023 13:38
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: