This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Captures user login timestamp and saves to user meta | |
* | |
* @param string $user_login Username of user logging in | |
* @param object $user WP_User object of user logging in | |
*/ | |
add_action('wp_login', function($user_login, $user) { | |
$timestamp = date('Y-m-d H:i:s', current_time('timestamp', 1)); | |
update_user_meta($user->ID, 'last_login', $timestamp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File names should be suffixed with "_{postid}" | |
# example_42.jpg | |
for filename in ./photos/*.jpg; do | |
ID1=$(echo $filename| cut -d'_' -f 2) | |
ID2=$(echo $ID1| cut -d'.' -f 1) | |
wp media import $filename --post_id=$ID2 --featured_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install BFG CLI | |
# https://rtyley.github.io/bfg-repo-cleaner/ | |
brew install bfg | |
# 2. Download BFG | |
# https://rtyley.github.io/bfg-repo-cleaner/ | |
# 3. Rename BFG's JAR file to 'bfg.jar' and move to ~/bfg.jar | |
# Test BFG by running empty "bfg" command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Patch code | |
jQuery.ajaxPrefilter(function(s) { | |
if (s.crossDomain) { | |
s.contents.script = false; | |
} | |
}); | |
// Patch code (minified) | |
jQuery.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Certbot | |
brew install certbot | |
# Generate certificate with DNS challenge and CSR from hosting server | |
sudo certbot certonly --manual --preferred-challenges dns --csr ~/Desktop/example.csr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP-CLI EVAL FILE | |
* | |
* Command: wp eval-file filename.php {run} | |
* | |
* Usage: If the 'run' argument is passed, this script will | |
* process the RUN block. Otherwise it will process the DRY RUN. | |
* | |
* https://github.com/wp-cli/wp-cli/wiki/API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Find available updates for WordPress plugins via WP-CLI, then upgrade theme one at a time. | |
# After each upgrade, commit the changed files to Git. | |
# | |
# Requires that WP-CLI be installed and in your path: http://wp-cli.org/ | |
# | |
# Currently, it will only work when run from the root of the WordPress installation, and has | |
# a hard-coded path for wp-content/plugins. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Usage: ./bitbucket-migrate.sh repos.txt | |
# | |
# repos.txt should have one repository per line. | |
echo "Reading $1" | |
while read line | |
do |
NewerOlder