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 | |
use Doctrine\ORM\Tools\Console\ConsoleRunner; | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
$paths = ['/home/andy/development/metagrated/poc/restengine/app/Lib/Domain/Mappings']; | |
require_once __DIR__.'/../../../../bootstrap/autoload.php'; | |
$paths = [ __DIR__ ]; |
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 namespace App\Http\Middleware; | |
use Auth; | |
use Closure; | |
use Config; | |
use Log; | |
class LoggingMiddleware { | |
/** |
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
# This config allows backwards compatibility for insecure TLS 1.0 protocols for Microsoft Browsers | |
# see https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html | |
# General SSL settings | |
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
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
# allow the one IP address and localhost connections, disallow all else | |
iptables -A INPUT -i lo -p tcp --dport mysql -j ACCEPT | |
iptables -A INPUT -i eth0 -p tcp --dport mysql -s 123.123.123.123 -j ACCEPT | |
iptables -A INPUT -p tcp --dport mysql -j DROP | |
# Use this on Debian to help persist over boot | |
# apt-get install iptables-persistent |
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
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE instr(meta_value, 'http://www.olddomain.com') > 0; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE instr(guid, 'http://www.olddomain.com') > 0; | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE instr(post_content, 'http://www.olddomain.com') > 0; |
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
<div> | |
Click <a href="/upload" class="modal-link" title="Upload your file">here</a> to upload an document. | |
</div> | |
<div id="dialog"></div> |
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 | |
# outputs all databases in the live database to gzipped sql dumps | |
# removes all the dumps that are older than 8 hours | |
# restore the dump with gunzip < outputfile.sql.gz | mysql < mysql options> | |
USER="myuser" | |
PASSWORD="password" | |
HOST="database.server" | |
OUTPUT="/home/ubuntu/database_backups/backups" |
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 namespace App\Lib\Purlgurl; | |
/** | |
* Class Purlgurl | |
* | |
* This class provides the purlgurl functionality - tracking visitors, and obtaining the responder from the request | |
* | |
*/ | |
use App; |
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
# Read | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart# | |
# http://tautt.com/best-nginx-configuration-for-security/ | |
# | |
# Generate your key with: openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
# Generate certificate: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt | |
server_tokens off; | |