Skip to content

Instantly share code, notes, and snippets.

View mtinsley's full-sized avatar

Mathew Tinsley mtinsley

  • Orange County, CA
View GitHub Profile
@mtinsley
mtinsley / main.tf
Created May 9, 2021 06:26
Terraform for remote state S3 bucket + DynamoDB table for locks
provider "aws" {
region = "us-west-2"
}
# S3 bucket for tfstate
resource "aws_s3_bucket" "terraform_state" {
bucket = "tfstate"
acl = "private"
versioning {
@mtinsley
mtinsley / column-toggle-and-size-for-jira-rapid-boards.js
Last active August 29, 2015 14:27 — forked from hestenet/column-toggle-and-size-for-jira-rapid-boards.js
A javascript hack for JIRA that allows resizing of RapidBoard columns and toggling their display on/off - just add to your Announcement Banner
/////////////////////
//
// DO NOT DELETE ME!
// Please take care when editing the announcement banner - it contains custom Javascript/CSS to improve Jira's UI.
//
/////////////////////
/////////////////////
// Inspired by
// https://jira.atlassian.com/browse/GHS-3690?focusedCommentId=693585&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-693585
@mtinsley
mtinsley / Lazy Image Size
Created June 7, 2015 19:02
Generate image sizes on the fly for WordPress
/**
* Create an image with the desired size on-the-fly.
*
* @param $image_id
* @param $width
* @param $height
* @param $crop
*
* @return array
*/
@mtinsley
mtinsley / remove-empty-p.php
Last active August 29, 2015 14:21 — forked from ninnypants/remove-empty-p.php
Removes empty paragraphs from the post content
<?php
/**
* Forked From: https://gist.github.com/ninnypants/1668216
*
* Modified to handle comments before or after an element.
*/
add_filter( 'the_content', 'remove_empty_p', 20, 1 );
function remove_empty_p( $content ){
// clean up p tags around block elements
$content = preg_replace( array(
#!/bin/sh
# The following demonstrates how to add build numbers to your project.
# This script can be added to your .git/hooks/pre-commit file. Alternatively
# you can add it as a separate shell script and call it from your pre-commit
# file.
# Fetch and increment the build number
buildnumber=`git rev-list HEAD --count`
((buildnumber++))