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 | |
/** | |
* | |
* There are use cases where using filter_var( FILTER_SANITIZE_STRING ) is not desireable because it is too greedy. | |
* In the event that you have written a more permissive xss cleaning routine this unit test can be used to test your | |
* cleaning routine. The list of attack vectors is not comprehensive but should give you a good start. | |
* | |
* The detection routine below is based on https://github.com/symphonycms/xssfilter/blob/master/extension.driver.php | |
* and on https://gist.github.com/mbijon/1098477 |
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 | |
/** | |
* addContentSecurityPolicy | |
* | |
* Read : https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
* https://www.owasp.org/index.php/Content_Security_Policy_Cheat_Sheet | |
* http://www.html5rocks.com/en/tutorials/security/content-security-policy/ | |
* https://www.owasp.org/index.php/Content_Security_Policy | |
* http://content-security-policy.com/ | |
* |
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 | |
use Monolog\Logger; | |
use Monolog\Formatter\LineFormatter; | |
use Monolog\Handler\StreamHandler; | |
class Log | |
{ | |
public static $log; |
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 | |
/** | |
* Class Cache | |
* | |
* Facade class to wrap the basic cache functions we use to the Memcached extension so that | |
* we can decide to use a different cache and just rewrite this file instead of changing | |
* all the usages. | |
* | |
* @author Andy Beak |
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 | |
/** | |
* Configures and provides an Entity Manager | |
*/ | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\Mapping\Driver\AnnotationDriver; | |
use Doctrine\Common\Annotations\AnnotationReader; |
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
# Read http://codex.wordpress.org/Nginx | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://www.queryadmin.com/854/secure-wordpress-nginx/ | |
# http://tautt.com/best-nginx-configuration-for-security/ | |
# https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html | |
# | |
# 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 |
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
composer.json | |
============= | |
For Laravel 4.x : "maatwebsite/excel": "1.*" | |
For Laravel 5 you can use the newer version. | |
HTML | |
==== | |
<form action="/ppd/download-excel" method="POST" id="download-ppd"> | |
<input id="form-filter-data" name="filter-data" type="hidden"> |
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
CREATE OR REPLACE RULE db_table_ignore_duplicate_inserts AS | |
ON INSERT TO db_table | |
WHERE (EXISTS ( SELECT 1 | |
FROM db_table | |
WHERE db_table.tbl_column = NEW.tbl_column)) DO INSTEAD NOTHING; |
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
/* | |
|-------------------------------------------------------------------------- | |
| Application Error Logger | |
|-------------------------------------------------------------------------- | |
| | |
| Here we will configure the error logger setup for the application which | |
| is built on top of the wonderful Monolog library. By default we will | |
| build a basic log file setup which creates a single file for logs. | |
| | |
*/ |
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
CREATE TABLE price_paid_data | |
( | |
id character varying(255) NOT NULL, | |
price integer NOT NULL, | |
purchase_date date NOT NULL, | |
postcode character varying(7), | |
property_type character varying(1), | |
new_build character varying(1) NOT NULL DEFAULT 0, | |
estate_type character varying(1), | |
paon character varying(255), |
OlderNewer