Skip to content

Instantly share code, notes, and snippets.

Del Putnam delputnam

View GitHub Profile
@delputnam
delputnam / .editorconfig
Last active Jul 1, 2020
Del's phpstorm .editorconfigfile
View .editorconfig
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true
ij_continuation_indent_size = 8
View svn-remove
svn status --ignore-externals | grep ! | tr -s ' ' | cut -d ' ' -f2 | xargs svn rm
View gist:828942dbe0a6d852be63edc37e7c3ec7

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
View gist:7e6f601863b0f7fc1097018e5eee855b
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
View gist:497ee68b4f2df9301ba4eb9753fb0b0f
svn status | grep ^\? | cut -c9- | xargs -d \\n rm -r
View gist:40c4c777707c292cf8f961663770d58d
svn diff > ~/my-awesome-diff.diff
patch -p0 < ~/my-awesome-diff.diff
View gist:8213bbe304b9ffbdcfc28f5d6b083e8c
find find . -name "*.unison.tmp" -delete
@delputnam
delputnam / jetpack-test.php
Last active Jan 23, 2018
A simple WordPress plugin to allow testing of Jetpack's Related Posts module
View jetpack-test.php
<?php
/**
* @package Jetpack_Test
* @version 1.0
*/
/*
Plugin Name: Jetpack Test
Description: Allows certain Jetpack modules that would otherwise require a connection to WordPress.com to be run in a local development environment.
Author: Del Putnam
@delputnam
delputnam / happy_git_on_osx.md
Created Jan 17, 2017 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X
View happy_git_on_osx.md

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
@delputnam
delputnam / gist:ece1350f6079225cc5de3acfee526059
Created Jan 6, 2017
Get paths of all image sizes for post attachments
View gist:ece1350f6079225cc5de3acfee526059
$args = array(
'posts_per_page' => 1,
'order' => 'ASC',
'post_mime_type' => 'image',
'post_parent' => $post_id,
'post_status' => null,
'post_type' => 'attachment',
);
$attachments = get_children( $args );
foreach( $attachments as $attachment ) {
You can’t perform that action at this time.