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 SecureSessionHandler extends SessionHandler { | |
protected $key, $name, $cookie; | |
public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
{ | |
$this->key = $key; | |
$this->name = $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
p { | |
max-width: 14.5cm !important; | |
font-size: 3mm !important; | |
text-indent: 4mm !important; | |
line-height: 1.5 !important; | |
text-align: justify !important; | |
margin: 0 !important; | |
} |
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
# Rewrite to the cached file if it exists and is not a post or attachment. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# RewriteCond %{REQUEST_METHOD} !=POST | |
# RewriteCond %{QUERY_STRING} !.*=.* | |
# RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f | |
# RewriteRule ^(.*) /$1/index.html [L] | |
</IfModule> |
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 | |
/** | |
* Htaccess Printer | |
* | |
* Prints an `.htaccess` file. | |
* | |
* @package Earth3300\EC01 | |
* @since 1.0.1 | |
* @author Clarence J. Bos <[email protected]> | |
* @copyright Copyright (c) 2018, Clarence J. Bos |
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
/** | |
* Get the Paths Used in the Current Project | |
* | |
* Uses options values if these are set. Modify on a per-project basis. | |
* Intended to be used to save and retrieve files, but can be used more | |
* generically as it sets and standardizes the document root and the relative | |
* path to the directory in which the containing file resides. | |
* | |
* Last updated: 2020-03-06 | |
* No. of lines: 42 |
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
# ALWAYS rewrite to the specified directory (excluding the directory itself). | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/main/ | |
RewriteRule ^(.*)$ /main/$1 | |
</IfModule> |
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
/** | |
* Console | |
* | |
* An absolutely positioned template intended for an HD monitor. Does NOT | |
* support mobile by design. | |
* | |
* @link https://gist.github.com/earth3300/2715962ab786f3781a6e0e9f1b993f07 | |
* File: console.css | |
* Created: 2020-02-10 | |
* Update: 2020-02-14 |
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
/** | |
* Rewrite with Caching (Complex). | |
* | |
* A complete rewrite module (WordPress flavoured) that includes rewriting to | |
* caching, a login rewrite, etc. | |
* | |
* @return string | |
*/ | |
private function getRewriteCachingComplex() | |
{ |
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
body { | |
font: 12pt/1.66 serif, "Libre Baskerville" !important; | |
text-align: justify; | |
margin: 30px auto 0 96pt; | |
} | |
body[data-mode=light] { | |
color: #000; | |
} |
NewerOlder