Skip to content

Instantly share code, notes, and snippets.

View MonaAghili's full-sized avatar
🎯
Focusing

Mona Aghili MonaAghili

🎯
Focusing
View GitHub Profile

Payload when we don't remove the logo

{
  "name": "afsdfsdf",
  "description": "",
  "address": "",
  "phone": "fadsfadsf",
  "email": "[email protected]",
  "website": "",
 "working_hours": "",

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@import "tailwindcss";
@theme {
/* Light Mode Color Tokens */
--color-primary-50: #eff6ff;
--color-primary-100: #dbeafe;
--color-primary-200: #bfdbfe;
--color-primary-300: #93c5fd;
--color-primary-400: #60a5fa;
--color-primary-500: #3b82f6;

بله، هر دوی npm و Yarn این قابلیت را دارند:

  • npm برای حذف پکیج‌های «اضافی» (extraneous) که در node_modules هستند ولی در package.json شما نیستند، از دستور زیر استفاده می‌کنید:

    npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
  • اگر نام پکیجی بدهید، فقط همان پکیج (و زیرمجلدهایش) حذف می‌شود.

const formConfig = {
options: {
classes: '',
footer: {
buttons: [
{
type: 'Submit',
name: 'ذخیره',
classes: 'form-submit-button',
},
I created this boundery for my react native app is it a good solution or is there another solution? i use it as a provider for global error handeling can you refactor it?
import React, { createContext, ReactNode, useContext, useState } from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
const ErrorContext = createContext<ErrorContextType | undefined>(undefined);
interface ErrorContextType {
error: Error | null;
setError: (error: Error | null) => void;
resetError: () => void;
I'm facing an issue with the toast message in my React Native app using the react-native-toast-message library. When the keyboard is minimized, the toast stays in the middle of the page, causing a poor user experience.
Problem Details:
I'm dismissing the keyboard when an error occurs using Keyboard.dismiss().
The toast is shown after the keyboard dismissal, but it does not adjust its position when the keyboard is minimized.
I need the toast to appear at the bottom of the screen, but when the keyboard is active or dismissed, it should adapt its position accordingly.
@MonaAghili
MonaAghili / core_components.ex
Created April 12, 2025 11:39 — forked from greven/core_components.ex
Phoenix CSS Icons
@doc """
Renders an icon.
Supports three icon libraries:
- [Heroicons](https://heroicons.com) - prefixed with "hero-"
- [Lucide](https://lucide.dev) - prefixed with "lucide-"
- [Simple Icons](https://simpleicons.org) - prefixed with "si-"
You can customize the size and colors of the icons by setting
width, height, and background color classes.
@MonaAghili
MonaAghili / service-workers.md
Created January 27, 2025 05:15 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@MonaAghili
MonaAghili / .Frontend Technical Interview Prep.md
Created January 16, 2025 11:31 — forked from augbog/.Frontend Technical Interview Prep.md
Frontend Technical Interview Prep: A study guide of things I constantly re-review when interviewing for frontend.

Frontend Technical Interview Prep

EDIT: Well this has been linked now so just an FYI this is still TBD. Feel free to comment if you have suggestions for improvements. Also here is an unrolled Twitter thread of a lot of the tips I talk about on here.

I've been doing frontend for a while now and one thing that really gripes me is the interview. I think the breadth of knowledge of a "Frontend Engineer" has been so poorly defined that people really just expected you to know everything. Many companies have made this a hybrid role. The Web is massive and there are many MANY things to know. Some of these things are just facts that you learn and others are things you really have to understand.

Every time I interview, I go over the same stuff. I wanted to create a gist of the TL;DR things that would jog my memory and hopefully yours too.

Lots of these things are real things I've been asked that caught me off guard. It's nice to have something you ca