View SecureSessionHandler.php
<?php | |
class SecureSessionHandler extends SessionHandler { | |
protected $key, $name, $cookie; | |
public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
{ | |
$this->key = $key; | |
$this->name = $name; |
View paragraph.css
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; | |
} |
View .htaccess-dir-cached
# 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> |
View printer.htac.php
<?php | |
/** | |
* Htaccess Printer | |
* | |
* Prints an `.htaccess` file. | |
* | |
* @package Earth3300\EC01 | |
* @since 1.0.1 | |
* @author Clarence J. Bos <cbos@tnoep.ca> | |
* @copyright Copyright (c) 2018, Clarence J. Bos |
View get_paths.php
/** | |
* 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 |
View .htaccess-www-https-dir
# ALWAYS rewrite to the specified directory (excluding the directory itself). | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/main/ | |
RewriteRule ^(.*)$ /main/$1 | |
</IfModule> |
View console.css
/** | |
* 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 |
View printer.htac.php.part
/** | |
* Rewrite with Caching (Complex). | |
* | |
* A complete rewrite module (WordPress flavoured) that includes rewriting to | |
* caching, a login rewrite, etc. | |
* | |
* @return string | |
*/ | |
private function getRewriteCachingComplex() | |
{ |
View reader-view.css
body { | |
font: 12pt/1.66 serif, "Libre Baskerville" !important; | |
text-align: justify; | |
margin: 30px auto 0 96pt; | |
} | |
body[data-mode=light] { | |
color: #000; | |
} |
NewerOlder