Skip to content

Instantly share code, notes, and snippets.

View SharlSherif's full-sized avatar
Working from home

Sharl SharlSherif

Working from home
  • Software Engineer II at Talabat (Delivery Hero)
View GitHub Profile
SharlSherif / console.js
Created July 13, 2021 01:14
Hide Facebook Sponsored Posts
let ads = [...document.querySelectorAll("a")].filter(x=>x.textContent == "Sponsored")
for(let ad of ads){
let y = ad.parentElement
while(y.parentElement.querySelector(`[data-pagelet='FeedUnit_{n}']`) == null){
} = "none";
SharlSherif / code.js
Last active August 7, 2020 23:54
This piece of code is taken from my Employee-Attendance-System mobile application from the backend (Nodejs) which is open source on my GitHub.
static async signInRoute(req, res) {
// empID should be extracted from the AUTH token provided by the client-side
const { site_token } = req.params
const isObjectID = /^[0-9a-fA-F]{24}$/
const site = decode(site_token);
// if not a valid object id
if (!isObjectID.test(site._id)) return res.status(400).send()
const site_id = site._id;
//! for testing