Skip to content

Instantly share code, notes, and snippets.

View anastely's full-sized avatar
:octocat:
Focusing

Anas Tely anastely

:octocat:
Focusing
View GitHub Profile
// scripts/Clear.sh
#!/bin/bash
echo "rm -rf ios/build..."
rm -rf ios/build
echo "rm -rf android/app/build..."
rm -rf android/app/build
echo "Removed all Xcode derived data..."
@derekstavis
derekstavis / FastList.tsx
Last active May 13, 2025 05:45 — forked from vishnevskiy/FastList.js
Discord's FastList, but in TypeScript
import { forEachObjIndexed } from "ramda";
import * as React from "react";
import {
Animated,
ScrollView,
View,
ViewStyle,
LayoutChangeEvent,
NativeScrollEvent,
} from "react-native";
@kelset
kelset / build-time-improvements.md
Last active June 23, 2025 14:22
This is kind of a blogpost about my experience of diving deep to improve some timings for an iOS React Native app

Improving times for both iOS build and CI for a React Native app

Intro

Hello there.

So, if you are here you probably saw my previous tweet where I asked for tips & tricks on improving the timing on an iOS/React Native app build time.

What will follow was how I mixed those suggestions + some good old GoogleSearch-fu + me deep diving on this for ~2 days.

@wesleygrimes
wesleygrimes / arrays-in-javascript.js
Created August 30, 2019 13:48
JavaScript Arrays
const heroes = [
{ fullName: 'Spider-Man', heroId: 1 },
{ fullName: 'Iron Man', heroId: 2 },
];
const alterEgos = [
{ fullName: 'Peter Parker', heroId: 1 },
{ fullName: 'Tony Stark', heroId: 2 },
];
@diego3g
diego3g / settings.json
Last active July 27, 2025 20:30
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@phuochau
phuochau / react-native-view-measurement.js
Last active May 16, 2023 15:09
Best way to measure layout of view in React Native (works in both iOS & Android)
import {
findNodeHandle
} from 'react-native'
this.childItem.measureLayout(findNodeHandle(this.containerWrapper), (x, y, width, height) => {
console.log('got measurement', x, y, width, height)
})
@hungvu193
hungvu193 / Bitrise.io Documents.md
Last active July 18, 2025 09:49
How to setup Bitrise.io to run a react native project

Set up a React Native app on Bitrise

Getting Started

Automating React Native apps on Bitrise? Sure thing! Let's see how! 🤖

  1. Log in to Bitrise and click +Add new app on your Dashboard!
  2. Connect your repository from your connected source code provider or add it manually. Connect repo
  3. Setup repository access (See DevCenter for detailed explanation!) Setup repo
  4. Validation setup: choose a branch for our scanner, this will help automation. How about a cuppa coffee while we are scanning your app?
@virolea
virolea / upload.js
Last active December 12, 2024 16:14
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@SergeyLipko
SergeyLipko / RN_flatList_example.js
Created May 29, 2017 18:21
Example of using RN FlatList component with pagination and pull-refreshing
import React from 'react';
import {
View,
Text,
FlatList,
StyleSheet
} from 'react-native';
import { ListItem } from 'react-native-elements';
class Users extends React.Component {

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.