Skip to content

Instantly share code, notes, and snippets.

View solimanware's full-sized avatar
🦆
debuggign

Osama Soliman solimanware

🦆
debuggign
View GitHub Profile
@solimanware
solimanware / governorates.json
Last active May 5, 2022 06:01
The Governorates of Egypt in JSON format https://www.buymeacoffee.com/microsmsm
[
{
"gov": "Cairo",
"locations": [
"15 Of May",
"Abbasia",
"Abdeen",
"Al Katamia",
"Bab El Shearia",
"Badr City",
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
let count = 0;
async function addFriends() {
const boxes = document.querySelectorAll(
"div.rq0escxv.j83agx80.rj1gh0hx.cbu4d94t.buofh1pr.g5gj957u.ph5uu5jm.b3onmgus.e5nlhep0.ecm0bbzt.n1dktuyu"
);
for (let box of Array.from(boxes)) {
let mutualFriendsText = box.querySelector(".a8c37x1j .ni8dbmo4 .stjgntxs");
let numberOfMutualFiends = Number(
mutualFriendsText?.innerText?.split(" ")[0]
let treesize = 10;
let counter = treesize;
let arr = [];
//tree
for (let i = 0; i < treesize; i++) {
arr.push(' '.repeat(counter) + '*'.repeat((i*2)+1));
counter--;
}
//trunk
@solimanware
solimanware / console.love.js
Created October 20, 2018 16:01
Console.love.js
(() => {
console.love = msg => {
const css = "color:#f40e83;font-size:25px;";
console.log(`%c${msg}`, css);
};
})();
console.love('Microsmsm')
@solimanware
solimanware / make2DArray.js
Created September 30, 2018 12:03
How To Make 2D Array In JavaScript
/**
* @param {number} rows
* @param {number} cols
*/
function make2DArray(rows, cols) {
let x = [];
for (let i = 0; i < rows; i++) {
x[i] = [];
for (let j = 0; j < cols; j++) {
x[i][j] = [];
/**
* @param {number[]} nums
* @return {number}
*/
var firstMissingPositive = function(nums) {
for (var i =0; i <= nums.length; i++) {
if (nums.indexOf(i+1) === -1){
return i+1
}
}
/** vars **/
var level = 1;
var score = null; //
var time = 3000 ; // milliseconds
var pause = false;
var lives = 3;
var sign = "+";
var isStarted = false;
/** Functions **/