Skip to content

Instantly share code, notes, and snippets.

View noriel0010's full-sized avatar
🏠
Working from home

Noriel noriel0010

🏠
Working from home
View GitHub Profile
@noriel0010
noriel0010 / countValleyAndMountain.php
Created October 18, 2022 12:07
A simple code to count valley, hackerrank.com sample exercise using php
<?php
function countingValleys($steps, $path) {
// Write your code here
if(strlen($path)!==($steps)){
return false;
}
$sea_level = 0;
$valley = 0;
$mountain = 0;
@noriel0010
noriel0010 / detect-js-framework.js
Last active November 11, 2022 06:18 — forked from rambabusaravanan/detect-js-framework.js
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]'))
alert('React.js');
if(Array.from(document.querySelectorAll('*'))
.some(e => e._reactRootContainer !== undefined))
alert('React.js');