This file contains hidden or 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-config.php snippet. Put this just before the "Happing Pressing!" comment. | |
// HTTPS and www redirects. | |
// Edit constants below based on your needs. | |
define( 'HOSTNAME_PREFERRED', 'www.domain.com' ); | |
define( 'HOSTNAME_PANTHEON_LIVE', 'live-domain.pantheonsite.io' ); | |
define( 'FORCE_HTTPS', true ); |
This file contains hidden or 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: CORS | |
* Description: Just adds headers to every response to enable cross-origin GET requests for API. | |
* Version: 0.0.1 | |
* Author: NJI Media | |
* Author URI: https://www.njimedia.com | |
* License: GPLv2 or later | |
* Text Domain: cors | |
* |
This file contains hidden or 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
{ | |
"minimum-stability": "dev", | |
"require": { | |
"drupal/coder": "^8.2", | |
"squizlabs/php_codesniffer": "2.9.0", | |
"wp-coding-standards/wpcs": "0.12.0" | |
}, | |
"scripts" : { | |
"post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths ../../wp-coding-standards/wpcs,../../drupal/coder/coder_sniffer", | |
"post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths ../../wp-coding-standards/wpcs,../../drupal/coder/coder_sniffer" |
This file contains hidden or 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
SELECT Concat('ALTER TABLE ', TABLE_NAME, ' RENAME TO my_prefix_', TABLE_NAME, ';') FROM information_schema.tables WHERE table_schema = 'my_database_name' |
This file contains hidden or 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
# BEGIN Access Control | |
<IfModule mod_setenvif.c> | |
# Check Host, set "edit" domain env | |
SetEnvIf Host "edit.domain.com" edit=1 # Prod | |
SetEnvIf Host "edit-stg.domain.com" edit=1 # Staging | |
SetEnvIf Host "edit.domain.loc|dev" edit=1 # Local Dev | |
# Build Edit-domain Whitelist | |
SetEnvIf REMOTE_ADDR ^nnn\.nnn\.nnn\.nnn$ whitelist=1 # Client HQ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JS Test</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> | |
</head> | |
<body> | |
<header> | |
<h1>JS Test</h1> | |
<p>Use console.</p> |
This file contains hidden or 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 Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>dtateii</string> |
This file contains hidden or 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
ls -tr | head -n -3 | sudo xargs --no-run-if-empty rm |
This file contains hidden or 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 | |
/** | |
* @file | |
* Simple processing on requests with notification. | |
*/ | |
_njisec_check_querystring(); | |
_njisec_check_method(); | |
_njisec_check_language(); |
This file contains hidden or 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
# APACHE RULE: DRUPAL (inside .htaccess) | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule sites/default/files/(.*) \ | |
http://{site.com}/sites/default/files/$1 [NC,L] | |
</IfModule> | |
# APACHE RULE: WORDPRESS (inside .htaccess) |
NewerOlder