Skip to content

Instantly share code, notes, and snippets.

View marktenney's full-sized avatar

Mark Tenney marktenney

View GitHub Profile
@razorfrog
razorfrog / gist:a78bcb374c98ee61b92013ad37600208
Created December 18, 2022 23:05
gp doctor for all sites
for wpconfig in /var/www/*/wp-config.php; do \
echo; site=${wpconfig%\/wp-config.php}; site=${site#\/var\/www\/}; \
gp wp $site doctor check --all
echo
done
@zackpyle
zackpyle / *Best Snippets*
Last active May 1, 2024 20:05
Best PHP/JS Snippets
This is a collection of my most used or most useful PHP and JS snippets
**Disclaimer, I didn't write most of these - I just curated them over the years**
@Pro496951
Pro496951 / Flappy Bird.html
Last active March 20, 2024 14:55
Basic Flappy bird game.this is not missing anything except the score counter
<html>
<head>
<title>Flappy Bird</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Permanent Marker' rel='stylesheet'>
@iqbalrony
iqbalrony / wp-custom-reset-password-form.php
Last active March 6, 2024 16:09
WordPress custom reset password form
<?php
/*
*Example Follw:-https://code.tutsplus.com/tutorials/build-a-custom-wordpress-user-flow-part-3-password-reset--cms-23811
*/
// Create the custom pages at plugin activation
register_activation_hook( __FILE__, 'dgm_plugin_activated' );
function dgm_plugin_activated() {
// Information needed for creating the plugin's pages
$page_definitions = array(
@scottopolis
scottopolis / events-calendar-api-apppresser.php
Created February 6, 2019 16:21
Events Calendar to WP-API for AppPresser apps
<?php
/*
Plugin Name: Add Events Calendar to AppPresser
Description: This plugin adds the Events Calendar CPT and some post meta data to the WP-API.
Version: 0.1
Author: Scott Bolinger
Author URI: https://apppresser.com
License: GPLv2
*/
@vegaskev
vegaskev / functions.php
Created July 20, 2018 22:05
Change Gravity Forms Spinner to CSS Spinner
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist.
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder
}
@sconstantinides
sconstantinides / styles.css
Created April 27, 2018 23:06
PWA media queries
/* Replace "standalone" with "fullscreen" depending on your manifest.json display mode */
@media (display-mode: standalone) {
/* All installed PWAs */
}
@media (max-width: 576px) and (display-mode: standalone) {
/* Installed PWAs on mobile devices */
@supports (-webkit-overflow-scrolling: touch) {
@spivurno
spivurno / gw-gravity-forms-entry-count-shortcode.php
Created September 4, 2014 15:14
Gravity Wiz // Gravity Forms // Entry Count Shortcode
<?php
/**
* Gravity Wiz // Gravity Forms // Entry Count Shortcode
*
* Extends the [gravityforms] shortcode, providing a custom action to retrieve the total entry count and
* also providing the ability to retrieve counts by entry status (i.e. 'trash', 'spam', 'unread', 'starred').
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
@wpscholar
wpscholar / replace-wp-dashboard.php
Last active January 30, 2024 13:55
Replace the default WordPress dashboard with a custom one
<?php
/**
* Plugin Name: Replace WordPress Dashboard
* Description: Replaces the default WordPress dashboard with a custom one.
* Author: Micah Wood
* Author URI: http://micahwood.me
* Version: 0.1
* License: GPL3
*/