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
#### | |
# | |
# Note this file should be place in: | |
# cd /etc/nginx/custom-sites/ | |
# Then be sure to restart nginx: | |
# $ sudo service nginx restart | |
location ~ ^/wp-content/uploads/(.*) { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ https://SOME-OTHER-URL-HERE.com/$1 redirect; | |
} |
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 | |
/** | |
* Rename meta keys | |
* Usage: update_meta_key( 'old_key', 'new_key'); | |
*/ | |
function update_meta_key( $old_key=null, $new_key=null ){ | |
global $wpdb; | |
$query = "UPDATE ".$wpdb->prefix."postmeta SET meta_key = '".$new_key."' WHERE meta_key = '".$old_key."'"; |
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
post-receive#!/bin/sh | |
### | |
# This file will deploy code from the repository into the | |
# specified web-root. | |
# | |
# File name: post-receive | |
# | |
# Instructions: | |
# 1. Uncomment and edit the lines below as needed |
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 | |
/** | |
* This file handles redirecting of our templates to our given views | |
* dir and anything else. | |
* | |
* Check if the themer has made a theme file in their | |
* theme dir, if not load our default. | |
* | |
* @uses template_redirect http://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect | |
*/ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AlternateMouseScroll</key> | |
<true/> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>ApplePressAndHoldEnabled</key> | |
<false/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.25332435965538025</real> |
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
ARG NODE_VERSION=node:8.11 | |
ARG WEB_ROOT | |
FROM $NODE_VERSION as dev_frontend_assets | |
RUN mkdir -p /app/public | |
COPY /src /app | |
WORKDIR /app | |
RUN npm install && npm run development | |
FROM nginx as frontend_dev |
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
#!/usr/bin/env bash | |
echo "Running boostrap.sh..." | |
echo "+---------------------------------------------------+" | |
echo "| Update apt-get |" | |
echo "+---------------------------------------------------+" | |
apt-get update | |
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 | |
/** | |
* | |
* This is used to regsiter a custom post type, custom taxonomy and provide template redirecting. | |
* | |
* This abstract class defines some base functions for using Custom Post Types. You should not have to | |
* edit this abstract, only add additional methods if need be. You must use what is provided for you | |
* in the interface. | |
* | |
*/ |
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
// A | |
return state[item_type].indexOf(item_id) != -1 ? true : false; | |
// B | |
return Boolean(state[item_type].find(items => items === item_id)); |
NewerOlder