Skip to content

Instantly share code, notes, and snippets.

View EndLess728's full-sized avatar
💭
iF U Can DreaM iT , YoU Can Do iT

Mantu Kumar EndLess728

💭
iF U Can DreaM iT , YoU Can Do iT
  • Panchkula,India
View GitHub Profile
//
// APIServiceError.swift
//
// Copyright © 2021 Kalpesh Talkar. All rights reserved.
//
import Foundation
public struct APIServiceError: LocalizedError {
@mvaisakh
mvaisakh / Bringup.md
Last active July 9, 2024 08:03
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@actuosus
actuosus / @react-native-firebase+messaging+6.4.0.patch
Created April 23, 2020 20:00
React Native Firebase Messaging Patch to use with patch-package when `mutable-content` is number or string
diff --git a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
index 18d69d9..8685051 100644
--- a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
+++ b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
@@ -113,7 +113,7 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo {
}
// message.mutableContent
- if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] isEqualToString:@"1"]) {
+ if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] intValue] == 1) {
@iegik
iegik / FAQ.md
Last active December 21, 2023 12:13
React Native tips & tricks

State management

All of the state management libraries you mentioned have their unique features and advantages, and the choice of which one to use ultimately depends on the specific needs and requirements of your project. However, here's a brief overview of each library:

  1. MobX: MobX is a simple, lightweight, and easy-to-learn library for managing state in React applications. It has a reactive programming model and provides automatic state updates, which means you don't have to write complex code for updating your app's state. It also has good performance and works well with TypeScript.

  2. React Context: React Context is a built-in feature of React that allows you to share data between components without having to pass props down the component tree. It's a good choice for simple use cases where you need to share state between components without any complex logic.

  3. Redux: Redux is a widely-used library that provides a single source of truth for managing state in large-scale React applications. It has

@steipete
steipete / ios-xcode-device-support.sh
Last active July 13, 2024 21:09
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
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",