Skip to content

Instantly share code, notes, and snippets.

View l4ci's full-sized avatar

Volker Otto l4ci

View GitHub Profile
# Auth
AuthName "Stage"
AuthType Basic
AuthUserFile /path/to/.htpasswd
Require valid-user
SetEnvIf Host stage.domain.de DEV
Order Allow,Deny
Allow from all
@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);
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 / jQuery: in view.js
Created January 9, 2018 10:09
Check if Element is in view
var $window = $(window);
$window_height = $window.height(),
scrollTop = $window.scrollTop();
/**
* Check if element visible in the viewport
*/
var aniElement = $('.animate');
var element_modifier = 0;
function checkIfInView() {
<?php
function get_host() {
if ($host = $_SERVER['HTTP_X_FORWARDED_HOST'])
{
$elements = explode(',', $host);
$host = trim(end($elements));
}
else
{
if (!$host = $_SERVER['HTTP_HOST'])
.clearfix::after {
content: '';
display: table;
clear: both;
}
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
<script id="__bs_script__">//<![CDATA[
document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.js?v=2.18.12'><\/script>".replace("HOST", location.hostname));
//]]></script>
@l4ci
l4ci / autolink.php
Last active December 18, 2015 03:49
Find and convert links in string #php