I hereby claim:
- I am cheapapples12 on github.
- I am bradleyhodges (https://keybase.io/bradleyhodges) on keybase.
- I have a public key ASBwpng0PVz9exBUDCsA0BzXPf1m-ybFrHVNvZboCUDnuQo
To claim this, I am signing this object:
function protectEmail($email) { | |
$suffix = substr($email, strpos($email, "@") + 1); | |
$email = str_replace($suffix, "", $email); | |
$email = str_replace("@", "", $email); | |
if (strlen($email) > 3) { | |
$f3c = mb_substr($email, 0, 3); | |
$rlength = (strlen($email) - 3); | |
$email = $f3c . str_repeat("*", $rlength); | |
return $email . "@" . $suffix; | |
} else { |
<?php | |
class SaferCrypto extends UnsafeCrypto { | |
const HASH_ALGO = 'sha256'; | |
public static function encrypt($message, $key, $encode = false) { | |
list($encKey, $authKey) = self::splitKeys($key); | |
$ciphertext = parent::encrypt($message, $encKey); | |
$mac = hash_hmac(self::HASH_ALGO, $ciphertext, $authKey, true); | |
if ($encode) { |
/* smoothscroll.js by @CheapApples12. Software provided without warranty. ©Copyright @CheapApples12 2017. All rights reserved. | |
/ Do not remove this attribution statement. | |
/ Use html "data-offset" attribute to offset scroll for headers and navbars. Eg. <a href="#test" data-offset="60" /> | |
*/ | |
$(function() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
// Please note that User Agents can be *EASILY* spoofed. Don't use this as a | |
// reliable indicator for security purposes. ie. don't trust anything the user | |
// tells you - that includes user agents and IP addresses. | |
function detectBrowser($useragent) { | |
$detectedBrowser = explode(" ", $useragent, 20); | |
$temp["dtbr_counter"] = true; foreach ($detectedBrowser as &$value) { | |
if ($temp["dtbr_counter"]) { | |
$temp["dtbr_exploded"] = explode("/", $value); |