This file contains 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 | |
function is_fake_email($email){ | |
return preg_match('~[^@]+@((\d+-m(ail)?|\d+c(huan|lickemail|n)|\d+d(-painting|ays-printing)|\d+(experts|hosting|mail|minutemail|ox|pad|paq|prong|tags|url|warding|wnd|zhuan)?|a(-bc|frobacon|g|gedmail|jaxapp|livance|milegit|miri|miriindustries|nappthat|no-mail|nonbox|nonymail|nonymbox|ntichef|ntispam|rmyspy|zmeil)|be(ddly|efmilk)|big(professor|string)|bi(nkmail|o-muesli)|bo(bmail|dhi\.lawlita|fthew|otybay|un|uncr|xformail)|bre(fmail|nnendesreich)|b(axomale\.ht|logmyway|roadbandninja|snow|u\.mintemail|uffemail|ugmenot|umpymail|und|urnthespam|uyusedlibrarybooks)|c(2|asualdx|ellurl|entermail|hammy|heatmail|hogmail|hoicemail1|hong-mail|lixser|mail|onsumerriot|ool|orreo\.blogos|osmorph|ourriel|ourrieltemporaire|rapmail|razymailing|ubiclink|urryworld|ust|uvox)|da(coolest|ndikmail|yrep)|d(bunker|cemail|eadaddress|eadspam|eagot|ealja|espam|espammed|evnullmail|fgh|igitalsanctuary|ingbone|iscardmail|isposableaddress|isposableemailaddresses|isposableinbox|ispose|isposeamail|isposem |
This file contains 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 | |
/** | |
* | |
* REDIS Protocol Encoder/Decoder | |
* http://redis.io/topics/protocol | |
* | |
*/ | |
class RESP { |
This file contains 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 | |
namespace SQL; | |
class Query { | |
public static function select(){ | |
return new QuerySelect; | |
} | |
} |
This file contains 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
<style> | |
body { background-color:#111; color:#eee; text-align:center; font: normal 14px/1.1em Helvetica } | |
#output { width:100%;height:200px;padding:1em;border:1px #000 dashed; background: rgba(255, 255, 255, 0.08); color: #ccc; | |
font-size: 0.9em; | |
font-family: monospace;} | |
#image_url{ font-size: 1.6em; width: 100%; text-align:center; background: rgba(255,255,255,.2); color:#fff; border: 0; padding: 0.7em;} | |
.btn { | |
box-shadow:inset 0px 1px 0px 0px #ffffff; | |
background:linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%); | |
background-color:#f9f9f9; |
This file contains 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 | |
function get_extended_post_data_by_id($ID, $hide_private=true){ | |
global $wpdb; | |
$meta_where = $hide_private ? "and substr(meta_key,1,1) <> '_'" : ''; | |
return (object) array_reduce($wpdb->get_results(" | |
(select 'id' k, ID v from $wpdb->posts where ID = $ID) union | |
(select 'title' k, post_title v from $wpdb->posts where ID = $ID) union | |
(select 'content' k, post_content v from $wpdb->posts where ID = $ID) union | |
(select 'excerpt' k, post_title v from $wpdb->posts where ID = $ID) union |
This file contains 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
<!-- | |
Questo codice si salva in localStorage le risorse interne di TypeKit | |
evitando il roundtrip di chiamata e il FOS. | |
Incollare lo snippet PRIMA del blocco : | |
<script src="https://use.typekit.net/gls5dvn.js"></script> | |
<script>try{Typekit.load({ async: true });}catch(e){}</script> |
This file contains 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 | |
function array_mask(array $unsafe, array $mask){ | |
return array_intersect_key(array_merge($mask, $unsafe), $mask); | |
} | |
$maschera_default = [ | |
'name' => 'Senza Nome', | |
'surname' => 'Senza Cognome', |
This file contains 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 CachedArray implements ArrayAccess { | |
private $cache, | |
$read, | |
$exists, | |
$update, | |
$delete; | |
public function __construct($callbacks){ |
This file contains 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 | |
function unique_id($len = 8) { | |
$base ='ABCDEFGHKLMNOPQRSTWXYZ0123456789'; | |
$max = strlen($base)-1; $code=''; | |
mt_srand((double)microtime()*1000000); | |
while (strlen($code)<($len+1)){ | |
$code .= $base{ mt_rand(0,$max) }; | |
} return $code; | |
} |