Skip to content

Instantly share code, notes, and snippets.

View gaswirth's full-sized avatar
🏠
Working from home

Nick Gaswirth gaswirth

🏠
Working from home
View GitHub Profile
@gaswirth
gaswirth / install_cursor.sh
Last active April 19, 2025 08:10 — forked from Kinyugo/install_cursor.sh
Cursor AI IDE Installer and Updater Script
#!/bin/bash
installCursor() {
local DEFAULT_CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
# Prompt for Cursor URL
echo "Please enter the Cursor download URL"
echo "Press Enter to use default: $DEFAULT_CURSOR_URL"
read -r USER_CURSOR_URL
@gaswirth
gaswirth / rhd-embeds.php
Last active November 10, 2022 22:34
WordPress manual header/footer embeds
<?php
/**
* Plugin Name: Embeds, Pixels, and Codes
* Description: Manual header and footer embeds for ads, tracking, CRMs, etc.
* Author: Roundhouse Designs
* Author URI: https://roundhouse-designs.com
* Version: 0.0.1
*
* @package rhd
*/
@gaswirth
gaswirth / rhd-mu-loader.php
Last active December 29, 2022 20:57
A small plugin to allow using plugin directories within the `mu-plugins/` directory
<?php
/**
* Plugin Name: RHDWP MU Loader
* Author: Roundhouse Designs
* Author URI: https://roundhouse-designs.com
* Description: Loads plugins in directories from the `mu-plugins` folder.
* Version: 1.0.0
*
* @package RHD
* @version 1.0.0
<?php
/**
* Render the latest product in the specified Product Category.
*
* @param array $atts The shortcode attributes
* @return string The formatted HTML
*/
function rhdwp_woo_yayday_latest_bundle_shortcode( $atts ) {
$product_args = shortcode_atts( array(
'category' => null,
<?php
/**
* Plugin Name: RHD Environment
* Description: Enables automatic updates and SMTP email via PHPMailer.
* Author: Roundhouse Designs
* Author URI: https://roundhouse-designs.com
*
* @package rhdwp
*/
@gaswirth
gaswirth / wp_helper.sh
Created September 6, 2017 20:41 — forked from phlbnks/wp_helper.sh
Utility script to help manage WordPress sites on an EasyEngine server (but not limited to EE)
#!/bin/bash
# Help / usage info.
USAGE=$'WordPress Helper script, built for EasyEngine but should be widely compatible.\nWithout any args it will search /var/www/ for WordPress sites, loop over them in alphabetical order and check for core and plugin updates.\nAlso accepts:\n\t--sites=[space seperated list of site paths relative to /var/www]\n\t--update=[plugins|wp|all].'
# Die function for exiting on errors.
die () {
echo "${1}, exitting..." >&2 ; echo ; exit 1
}