Skip to content

Instantly share code, notes, and snippets.

View Ali72's full-sized avatar
🤓
Working from home

Ali khajehpour Ali72

🤓
Working from home
View GitHub Profile
@Ali72
Ali72 / HorizontalRTLSupportFlatList.js
Created September 20, 2024 13:03
HorizontalRTLSupportFlatList
import React, {useEffect, useRef, useState} from 'react';
import {FlatList, I18nManager} from 'react-native';
/**
* HorizontalRTLSupportFlatList
*
* This component is a custom wrapper around React Native's FlatList to add support
* for Right-to-Left (RTL) layouts when rendering horizontal lists. It automatically
* handles reversing the scroll direction and item order in RTL mode while maintaining
* the correct visual order of list items. Additionally, it includes logic to manage
@Ali72
Ali72 / NSURLErrorDomain.h
Created October 8, 2023 07:06 — forked from kos9kus/NSURLErrorDomain.h
URL Loading System Error Codes
These values are returned as the error code property of an NSError object with the domainNSURLErrorDomain”.
Declaration
SWIFT
var NSURLErrorUnknown: Int { get }
var NSURLErrorCancelled: Int { get }
var NSURLErrorBadURL: Int { get }
var NSURLErrorTimedOut: Int { get }
var NSURLErrorUnsupportedURL: Int { get }
var NSURLErrorCannotFindHost: Int { get }
@Ali72
Ali72 / CoreMediaError.swift
Last active May 17, 2024 15:38
AVPlayer CoreMedia Errors
/**
-NOTE:
After AVPlayerItem faces an error you can create CoreMedia Error from the underlying Error inside AVPlayerItem error.
With the `CoreMediaError` enum, you can convert errors to more readable ones,handle AVPlayerItem Common errors,
and show the proper messages to your users.
**/
public enum CoreMediaError:Error {
@Ali72
Ali72 / BIG iOS URL SCHEME LIST.txt
Last active August 15, 2023 17:32 — forked from hugosenari/BIG iOS URL SCHEME LIST 1.txt
Android/IOs Url Schemas
BIG iOS URL SCHEME LIST
HAD TO MAKE A DROPBOX FILE BECAUSE THIS LIST WAS TOO LONG TO POST IN THE COMMENTS OR NOT MAKE THE WORKFLOW APP TAKE FOREVER TO READ IT.
☠JAILBREAK/SYSTEM APPS
--------------------------
activator://
itms-apps://
itms-services://
internal let DEFAULT_MIME_TYPE = "application/octet-stream"
internal let mimeTypes = [
"html": "text/html",
"htm": "text/html",
"shtml": "text/html",
"css": "text/css",
"xml": "text/xml",
"gif": "image/gif",
"jpeg": "image/jpeg",