Skip to content

Instantly share code, notes, and snippets.

View samarulrajt's full-sized avatar
😃
I may be slow to respond.

Sam Arul Raj (Sam) samarulrajt

😃
I may be slow to respond.
View GitHub Profile
class Myhelper {
var $skey = "YOU CAN CHANGE"; // you can change it
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+','/','='),array('-','_',''),$data);
return $data;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
@samarulrajt
samarulrajt / Verify if PRIVATE BROWSING is blocking local storage
Created December 31, 2019 05:00
Verify if PRIVATE BROWSING is blocking local storage
<!-- ERROR FOR BLOCKED LOCAL STORAGE -->
<div id="apple_storage" style="display:none;">
<div class="modal-new alerts">
<h2>Attenion</h2>
<a href="" class="close" onclick="document.getElementById('apple_storage').style.display = 'none';">Close</a>
<div class="body">
<p>
Dear customer, to ensure proper use of the site it is necessary to abandon the
private browsing.
</p>
var callbackStack = [];
const parser = port.pipe(new ByteLength({length: 11}))
parser.on('data', function (data) {
if (callbackStack.length > 0) {
var callback = callbackStack.pop();
callback(null, data);
};
console.log('DATA RECEIVED: ', Buffer.from(data, 'hex'))