Skip to content

Instantly share code, notes, and snippets.

View mohammad-mghn's full-sized avatar
👋
Code In Peace

mohmmad.mohagheghian mohammad-mghn

👋
Code In Peace
View GitHub Profile
@mohammad-mghn
mohammad-mghn / ultimateReactDevelopmentVSCodeSetup.code-profile
Last active July 30, 2023 13:42
ultimateReactDevelopmentVSCodeSetup.code-profile
{"name":"Web development","settings":"{\"settings\":\"{\\r\\n \\\"glassit.alpha\\\": 215,\\r\\n \\\"editor.fontFamily\\\": \\\"Consolas, '2 Yekan', 'Courier New', monospace, FiraCode Nerd Font Propo\\\",\\r\\n \\\"files.autoSave\\\": \\\"afterDelay\\\",\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\",\\r\\n \\\"editor.fontSize\\\": 18,\\r\\n \\\"workbench.editor.enablePreview\\\": false,\\r\\n \\\"terminal.integrated.fontSize\\\": 16,\\r\\n \\\"editor.quickSuggestions\\\": {\\r\\n \\\"strings\\\": true\\r\\n },\\r\\n \\\"editor.tokenColorCustomizations\\\": {\\r\\n \\\"strings\\\": \\\"#10dbff\\\"\\r\\n },\\r\\n \\\"terminal.integrated.tabs.defaultIcon\\\": \\\"terminal-bash\\\",\\r\\n \\\"editor.wordWrap\\\": \\\"on\\\",\\r\\n \\\"typescript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\r\\n \\\"javascript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\r\\n \\\"workbench.colorTheme\\\": \\\"Dobri Next -A01-
const [cover, setCover] = useState<any>(); // paste this in tour component route
<FilePond
files={cover}
chunkUploads={true}
onupdatefiles={setCover}
server={{
process: {
url: <COULDINARY_API_UPLOAD_IMAGE>,
onerror: (error: any) => {
@mohammad-mghn
mohammad-mghn / deleteProperties.ts
Created April 27, 2023 13:42
delete properties of a object in typescript
const deleteProperties = (obj: any, propertiesToDelete: string[]) => {
for (const property of propertiesToDelete) {
delete obj[property];
}
};
@mohammad-mghn
mohammad-mghn / emoji-array.txt
Last active December 5, 2023 09:32
emoji array
[
"😀",
"😃",
"😄",
"😁",
"😆",
"😅",
"😂",
"🤣",
"😊",