Skip to content

Instantly share code, notes, and snippets.

View l4ci's full-sized avatar

Volker Otto l4ci

View GitHub Profile
var consoleHolder = console;
/**
* Set the debug level
* @type int
* 0/false = disabled
* 1 = enabled
*/
var debug_lvl = false;
function debug(bool){
if ( !bool ){
@l4ci
l4ci / php: encrypt email rot13.txt
Created January 9, 2018 10:11
Encrypts an email via rot13 encryption
<?php
/**
* Encrypts an email w/out mailto link via rot13 encryption
* decrypts it via javascript
* @param string $email Email
* @param boolean $mailto Wrap in <a href='mailto:'></a>
* @return string Safe Email
*/
function safeMail($email,$mailto=true){
$e = str_rot13($email);
# Auth
AuthName "Stage"
AuthType Basic
AuthUserFile /path/to/.htpasswd
Require valid-user
SetEnvIf Host stage.domain.de DEV
Order Allow,Deny
Allow from all
# Wartungsmodus
RewriteCond %{REMOTE_ADDR} !=84.46.78.143
RewriteCond %{REQUEST_URI} !=/wartung.html
RewriteRule ^(.*)$ /wartung.html?%{REMOTE_ADDR} [R=503,L]
# no-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Alternative via Port
#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
AuthType Basic
AuthName "Development"
AuthUserFile /var/.htpasswd
Require valid-user
# User specific & automatically generated files
/dist
/composer.lock
/phpunit.xml
/phpcs.xml
bower_components
node_modules
#kirby
/site/accounts
<script src="https://cdn.jsdelivr.net/webfontloader/1.6.27/webfontloader.js"></script>
<script>
WebFont.load({
google: {
families: ['Source Serif Pro','Source Sans Pro:400,700']
},
custom: {
families: ['FontAwesome'],
urls: ['https://cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css']
}
<div style="overflow:hidden;width:0;height:0;"><div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="email" name="email" tabindex="-1" value="" autocomplete="off"></div></div>