Skip to content

Instantly share code, notes, and snippets.

View Octagon-simon's full-sized avatar
Turning red flags into red tests that pass.

Simon Ugorji (Octagon) Octagon-simon

Turning red flags into red tests that pass.
View GitHub Profile
var checkDate = findNotifDate("2021-11-05 15:00:00");
console.log(checkDate);
const dt = new Date("2021-11-06 22:21:10");
var ts = dt.getTime().toString(); //"1636120800000"
var checkDate = findNotifDate(ts);
console.log(checkDate);
$checkDate = findNotifDate("2021-11-05 15:00:00", '+1');
var_dump($checkDate);
<p id="cb-console-log" style="display:none">
&lt; script &gt;
console.log('Hello');
&lt; /script &gt;
</p>
var code = document.createElement("div");
code.setAttribute("class", "code");
document.body.appendChild(code);
<p id="cb-console-log" style="display:none">
<script>
console.log('Hello');
</script>
</p>
var codeSnippet = document.querySelector('#cb-console-log').innerHTML;
<script id="cb-create-code-structure">
var code = document.createElement("div");
code.setAttribute("class", "code");
document.body.appendChild(code);
//Destroy Self
document.querySelector('#cb-create-code-structure').remove();
</script>
confirm("Are you human");
<form method="post" onsubmit="return confirm('Are you sure you want to submit?')">
<!-- Some fields here -->
<button type="submit">Submit</button>
</form>