Skip to content

Instantly share code, notes, and snippets.

View shawn-crigger's full-sized avatar

Shawn Crigger shawn-crigger

View GitHub Profile
@shawn-crigger
shawn-crigger / disable-comments.php
Created December 16, 2024 02:50 — forked from doiftrue/disable-comments.php
[wp-kama embed] https://wp-kama.com/2539 Disable Comments for WordPress. Original code see here: https://github.com/WPDevelopers/disable-comments-mu
<?php
/**
* Plugin Name: Disable Comments (Must Use version)
* Description: Disables all WordPress comment functionality on the entire network.
* Version: 1.1.2 (changed)
* Plugin Changed URI: https://gist.github.com/doiftrue/ab931c1d866cb113b4ff318a5faeb3b3
* Plugin URI: https://github.com/WPDevelopers/disable-comments-mu
* GitHub Plugin URI: https://github.com/WPDevelopers/disable-comments-mu
* Author: WPDeveloper
* Author URI: https://wpdeveloper.com
@shawn-crigger
shawn-crigger / badge.js
Created May 14, 2021 17:18
Badge JS, See comments for instructions
(function(gsCertified, b) {
return gsCertified[gsCertified.eventsObj] = {
init: function(config) {
this.defaultConfig = {
// url this script is served from
"sourceBaseUrl" : 'http://certifications.test',
// api endpoint
"apiUrlEndpoint": 'http://certifications.test/get-certification-verification.json',
// relative path on source url seal comes from
"certImage" : 'assets/img/grandstrandcertified-prof.png',
<?php
use Carbon\Carbon;
define( 'OPENMAP_API_KEY', '0d86bc33034b99c11c73e7ee8ab0ffa6' );
/**
* Attempts to fetch document at $requestAddress
*
* @param $requestAddress string
* @param $i int
* @return string
<?php
// Load requires libraries which should have been loaded via Composer but the Company was against composer because they didn't understand Autoloading and the Power of Using Composer at all. Failure to Continue to Learn is never a good sign for a long life history.
require('/var/www/jb-virts/redbird.aero/v1/lib/Zebra_Image.php');
if ( ! class_exists( 'Aws\\Credentials\\Credentials' ) ) :
require('/var/www/jb-virts/redbird.aero/v1/lib/aws.phar');
endif;
use Aws\Sts\StsClient;
use Aws\S3\S3Client;
@shawn-crigger
shawn-crigger / set-expires.php
Created October 27, 2020 19:42
set expires
<?php
// vim: set et ts=3 sts=3 sw=3 fdm=marker:
// ------------------------------------------------------------
// Author: Shawn Crigger ([email protected])
// File: setexpires.cron.php
// Created: 10:00:00 AM EDT Mon, June 15, 2020
// ------------------------------------------------------------
$debug_mode = true; // WILL STIL CHARGE - Should be verbose mode
$debug_email = true; // Set to true to send all emails to my email
@shawn-crigger
shawn-crigger / date-percentage.php
Created February 15, 2020 13:26
This class can calculate the percentage of the days that passed.
<?php
/*
*I dont know if this can be useful for you but
*
*I came up with it, and I give it as a present to you.
*
*I'm not a skillful programmer, I just enjoy doing this,
*
*Thanks for reading
*********************************************************
@shawn-crigger
shawn-crigger / README.md
Last active June 28, 2024 19:07
FlightCircle Oauth2 example

FlightCircle oAuth2 example

This example uses the package at thephpleague/oauth2-client and uses composer to install that.

Installation

First download and unzip the example files and open that directory in your terminal.

cd fc-oauth2-example
@shawn-crigger
shawn-crigger / tokenstore.php
Last active June 28, 2024 19:07
Auth Shim Singleton with Magic Method for easier Calling
<?php
abstract class Singleton {
protected static $instances = array();
protected function __construct(){}
private function __clone(){}
private function __wakeup(){}
public static function getInstance($access_token) {
$class = get_called_class();
if(!isset(self::$instances[$class])) {

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@shawn-crigger
shawn-crigger / webdev_tools.md
Created July 15, 2019 14:07 — forked from slow-is-fast/webdev_tools.md
Web Development Tools