Skip to content

Instantly share code, notes, and snippets.

View far1dghaderi's full-sized avatar
❤️
Love Coding

faridghaderi far1dghaderi

❤️
Love Coding
View GitHub Profile
@far1dghaderi
far1dghaderi / capitalize.js
Created May 2, 2023 07:09
Interview questions
//#region Capitalize
// Write a function that accepts a string. The function should
// capitalize the first letter of each word in the string then
// return the capitalized string.
//i.e-1: capitalize('a short sentence') --> 'A Short Sentence'
//i.e-2: capitalize('a lazy fox') --> 'A Lazy Fox'
//i.e-3: capitalize('look, it is working!') --> 'Look, It Is Working!'
function capitalize(str) {
//TODO
@far1dghaderi
far1dghaderi / IGfoolowersReport.js
Last active January 9, 2022 08:19
Get instagram's followers list
let prevFollowers = localStorage
.getItem(`${location.pathname.split("/")[1]}-followers`);
let followers = document.querySelectorAll("._1XyCr .FPmhX");
let flwrs = [];
followers.forEach((item) => {
flwrs.push(`${item.href}`.split("/").reverse()[1]);
});
if (prevFollowers) {
prevFollowers = prevFollowers.split("-");
let newFollowers = flwrs.filter((follower) => {
@far1dghaderi
far1dghaderi / cloudSettings
Last active September 2, 2021 07:58
My vscode setting
{"lastUpload":"2021-09-02T07:58:02.062Z","extensionVersion":"v3.4.3"}