This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function saveAttachmentsFromSender() { | |
| const SENDER = "******"; | |
| const FOLDER_ID = "*******"; | |
| const folder = DriveApp.getFolderById(FOLDER_ID); | |
| const threads = GmailApp.search(`from:${SENDER} has:attachment`); | |
| let savedCount = 0; | |
| threads.forEach(thread => { | |
| const messages = thread.getMessages(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "currencies": { | |
| "AED": { | |
| "code": "AED", | |
| "number": "784", | |
| "digits": 2, | |
| "currency": "United Arab Emirates dirham", | |
| "countries": [ | |
| "United Arab Emirates" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useCallback, useEffect, useRef, useState } from 'react' | |
| import loggerClient from '@/lib/logger-client' | |
| const useLocalStorage = <T>( | |
| key: string, | |
| defaultValue: T, | |
| ): [T, (value: T | ((prev: T) => T)) => void] => { | |
| const [value, setValue] = useState<T>(defaultValue) | |
| const [isHydrated, setIsHydrated] = useState(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- eslint-disable vue/no-v-html --> | |
| <template> | |
| <div | |
| ref="root" | |
| :class="['markdown-display', containerClass]" | |
| v-bind="$attrs" | |
| v-html="safeHtml" | |
| /> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Dexie from "dexie"; | |
| import helpers from "./helpers"; | |
| // Constants | |
| const CACHE_CONSTANTS = { | |
| DB_NAME: "ProgressCacheDB", | |
| // TTL Settings | |
| HISTORICAL_TTL: 7 * 24 * 60 * 60 * 1000, // 7 days | |
| TODAY_TTL: 2 * 60 * 60 * 1000, // 2 hours |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { dirname } from 'path' | |
| import { fileURLToPath } from 'url' | |
| import { FlatCompat } from '@eslint/eslintrc' | |
| import prettier from 'eslint-plugin-prettier' | |
| import jsxA11y from 'eslint-plugin-jsx-a11y' | |
| const __filename = fileURLToPath(import.meta.url) | |
| const __dirname = dirname(__filename) | |
| const compat = new FlatCompat({ baseDirectory: __dirname }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ========================================= | |
| -- Create a read-only SQL Server login/user for all databases | |
| -- Usage: Set @username and @password as needed | |
| -- ========================================= | |
| -- Step 1: Declare variables for username and password | |
| DECLARE @username NVARCHAR(128) = N'USERNAME'; | |
| DECLARE @password NVARCHAR(128) = N'PASSWORD'; | |
| -- Step 2: Create the login at the server level (if not already created) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use client'; | |
| import React, { createContext, JSX, useCallback, useContext, useEffect, useState } from "react"; | |
| import { useLocalStorage } from "@/hooks/useLocalStorage"; | |
| import { THEME, LOCALE } from "@/theme"; | |
| // import type { ThemeMode, LocaleType } from '@/theme'; | |
| interface ApplicationConfigsProps { | |
| children: JSX.Element; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check if script is running as Administrator | |
| $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
| if (-not $isAdmin) { | |
| Write-Error "This script must be run as Administrator. Exiting..." | |
| exit 1 | |
| } | |
| # Step 1: Backup and remove NODE_ENV from system environment | |
| $originalNodeEnv = [System.Environment]::GetEnvironmentVariable("NODE_ENV", "Machine") | |
| [System.Environment]::SetEnvironmentVariable("NODE_ENV", $null, "Machine") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // React and types | |
| import * as React from 'react'; | |
| import type { Dayjs } from 'dayjs/esm'; | |
| // Dayjs and locales | |
| import 'dayjs/locale/he'; | |
| import 'dayjs/locale/en'; | |
| // MUI X Date Pickers | |
| import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; |
NewerOlder