Skip to content

Instantly share code, notes, and snippets.

View bswatson's full-sized avatar

Brian Watson bswatson

View GitHub Profile
@ServerlessBot
ServerlessBot / IAMCredentials.json
Last active December 20, 2023 16:50
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active April 26, 2024 10:15
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@norcross
norcross / rkv-multi-crosspost.php
Last active November 6, 2017 01:28
cross post (syndicate) posts on a WP multisite install
<?php
/*
Plugin Name: Multisite Cross Post
Description: Cross post content between a WP multisite installation
Author: Andrew Norcross
Version: 0.1
Author URI: http://andrewnorcross.com
*/
class RKV_Multi_CrossPost {
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/Sites/wp-plugins/$DIR_NAME/$BRANCH