Skip to content

Instantly share code, notes, and snippets.

View jsoningram's full-sized avatar

Jason Ingram jsoningram

  • Orange County, CA
View GitHub Profile
@jsoningram
jsoningram / View_Variables.php
Created August 1, 2016 06:01
Better print_r and more flexible var_dump
<?php
class View_Variables {
public static function dump( $variables, $die = true ) {
if ( is_array( $variables ) ) {
foreach ($variables as $var ) {
var_dump( $var );
}
} else {
var_dump( $variables );
@jsoningram
jsoningram / export-yoast-redirects.php
Created August 24, 2016 23:42
Export Yoast redirects to CSV file
<?php
$array = get_option('wpseo-premium-redirects');
foreach ( $array as $key => $row ) {
file_put_contents( ABSPATH . 'redirects.csv', $key . ',' . $row[ 'url' ] . "\n", FILE_APPEND );
}
{
"heading":
"Thank you for your interest in the MotorTrend / Hot Wheels<sup>®</sup> promotion!",
"logos": [
"https://mtg-mtod-production.s3-us-west-2.amazonaws.com/images/hotwheels-logo.png",
"https://mtg-mtod-production.s3-us-west-2.amazonaws.com/images/motortrend-logo-desktop-red.svg"
],
"messaging": {
"campaign.code.already.used":
"We are sold out at this time, but look for more opportunities in the future from us. In the meantime learn more about MotorTrend and subscribe to our streaming service by clicking <a href="/freetrial/">on this link</a>.",
@jsoningram
jsoningram / jackpot.js
Last active April 27, 2025 13:24
Jackpot
const SymbolKeys = {
Bitcoin: 'bitcoin',
Cash: 'cash',
Cherry: 'cherry',
Diamond: 'diamond',
Gold: 'gold',
};
// If all rollers equal one of the `Prize` keys, we'll multiply the value by
// the amount the user entered