Skip to content

Instantly share code, notes, and snippets.

View cdukes's full-sized avatar

Cooper Dukes cdukes

View GitHub Profile
@cdukes
cdukes / Cleanup WP Images.sh
Created May 10, 2015 09:12
Remove WP-style generated images, leaving only the originals.
# OS X
# List affected files
find -E . -regex '.*/[-_a-zA-Z0-9]+-[0-9]+x[0-9]+\..+' -print -exec ls '{}' \;
# Remove affected files
find -E . -regex '.*/[-_a-zA-Z0-9]+-[0-9]+x[0-9]+\..+' -print -exec rm '{}' \;
# Downsize all images to 1200px
find . -iname "*.jpg" -type f -exec sh -c 'sips -Z 1200 "$0"' {} \;
@cdukes
cdukes / php.ini
Created April 13, 2015 15:41
Catch emails from PHP and write them to a file
sendmail_path = /path/to/sendmail.php
@cdukes
cdukes / starter-wp-config.php
Last active March 28, 2018 02:24
Boilerplate wp-config.php for WordPress
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@cdukes
cdukes / starter-htaccess
Created October 22, 2012 08:43
Boilerplate .htaccess for WordPress
# BEGIN WordPress
# END WordPress
# ----------------------------------------------------------------------
# Protect WP-Config
# ----------------------------------------------------------------------
<files wp-config.php>
order allow,deny
deny from all