Skip to content

Instantly share code, notes, and snippets.

View joelataylor's full-sized avatar

Joel Taylor joelataylor

View GitHub Profile
@joelataylor
joelataylor / commands.md
Last active February 9, 2019 13:03
Docker commands

Update WP domains

docker exec -it globalx_wordpress_1 /bin/bash wp --allow-root search-replace 'https://www.globalxfunds.com' 'http://globalxfunds.test:8888'

or run externally

docker exec globalx_wordpress_1 bash -c "wp --allow-root search-replace 'https://www.globalxfunds.com' 'http://globalxfunds.test:8888'"

Attribute Type Description
value string The IP address value
@joelataylor
joelataylor / featured_image.php
Created September 10, 2015 12:48
WP Require Featured Image on Post
@joelataylor
joelataylor / git_techniques.md
Created September 2, 2015 19:23
Git/GitHub Tips
@joelataylor
joelataylor / sever-setup.md
Last active August 29, 2015 14:25
Local Dev Setup

Install PHP 5.6 with OpenSSL (fixes Curl issue on Yosemite)

brew install --with-apache --with-homebrew-curl --with-homebrew-openssl --without-snmp php56

Now plugins: brew install php56-mcrypt php56-apcu php56-redis php56-memcached php56-xdebug

@joelataylor
joelataylor / server-setup.md
Last active January 11, 2016 02:24
Server Setup Notes
@joelataylor
joelataylor / fractions.php
Last active August 29, 2015 14:19
OAMM WordPress to Fraction Calculation
public function to_fraction($float) {
$whole = floor( $float );
$decimal = $float - $whole;
if ($decimal == 0) return $whole;
$valid_decimals = array(
'1/8' => 0.125,
'1/4' => 0.25,
'1/3' => 0.333,
@joelataylor
joelataylor / get-videos.js
Created February 7, 2015 19:31
PhantomJS test
var page = new WebPage(),
testindex = 0,
loadInProgress = false,
fs = require('fs');
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.onLoadStarted = function() {
<select name="rollbar_logging_level">
<option value="1" <?php echo rollbar_get_error_level_match($current_val, 1); ?>>Fatal run-time errors (E_ERROR) only</option>
<option value="2" <?php echo rollbar_get_error_level_match($current_val, 2); ?>>Run-time warnings (E_WARNING) and above</option>
<option value="4" <?php echo rollbar_get_error_level_match($current_val, 4); ?>>Compile-time parse errors (E_PARSE) and above</option>
<option value="8" <?php echo rollbar_get_error_level_match($current_val, 8); ?>>Run-time notices (E_NOTICE) and above</option>
<option value="256" <?php echo rollbar_get_error_level_match($current_val, 256); ?>>User-generated error messages (E_USER_ERROR) and above</option>
<option value="512" <?php echo rollbar_get_error_level_match($current_val, 512); ?>>User-generated warning messages (E_USER_WARNING) and above</option>
<option value="1024" <?php echo rollbar_get_error_level_match($current_val, 1024); ?>>User-generated notice messa
@joelataylor
joelataylor / adg-htaccess
Created January 26, 2015 00:17
ADG htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Redirect to https (this causes an infinite loop??)
#RewriteCond %{HTTPS} !^on$
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# Redirect old product urls