Skip to content

Instantly share code, notes, and snippets.

View RidaRidss's full-sized avatar
🎯
Focusing

Rida Sarwar RidaRidss

🎯
Focusing
View GitHub Profile

watchman watch-del-all rimraf -r $TMPDIR/react-* rimraf -r node_modules/ rimraf -r build/ios npm cache verify yarn cache clean pc restart yarn install yarn start --reset-cache

@RidaRidss
RidaRidss / Enable rm command in windows system.md
Created January 22, 2019 07:07
Enable rm command in windows system

1. npm install -g rimraf

#2. discard terminal open again

rimraf -r (your query)

e.g: rimraf -r TMPDIR/react-*

@RidaRidss
RidaRidss / get SHA id from window system.md
Created January 2, 2019 08:36
get SHA id from window system

keytool -list -v -keystore "C:\Users\Rida.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

@RidaRidss
RidaRidss / clear cache and rebuild fix third party glog issue in xcode proj.md
Created December 21, 2018 06:30
clear cache and rebuild fix third party glog issue in xcode project

Clear Cache Mac

  • watchman watch-del-all
  • rm -rf $TMPDIR/react-*
  • rm -rf node_modules/
  • rm -rf build/ios
  • npm cache verify
  • yarn cache clean
  • pc restart
  • yarn install
@RidaRidss
RidaRidss / ios kill port and rebuild.md
Last active December 21, 2018 06:26
kill ports of running server and build fresh in ios

rm -rf ios/build/; kill $(lsof -t -i:8081);react-native run-ios

clean cache with

npm cache clean --force

install the latest version of npm globally as admin:

npm install -g npm@latest --force

1. Make it look like the icon the user taps grows to fill the entire screen making for a seamless transition.
2. Keep it simple. A splash screen should only show for a few milliseconds. It shouldn’t have a lot of information on it — it is, after all, a dreaded loading screen.
3. With all of this in mind we’ll start with a a square image at three sizes (@1x = 200px, @2x = 400px, @3x = 600px).
Preparing the App
If you’ve tried to set up a splash screen in React Native then you may have experience a white screen flash before your content loads. If your app has a white background this is often not very noticable, but it’s still a pain. Today we’re going to make it very noticable if we have any flashes of white. To do that we’ll set a dark background color in our app.
Replace App.js with
import React, { Component } from 'react';
This post outlines how to get custom fonts working reliably in React Native.
Most crucially, our font files have to be named correctly. I recommend using the following format for file names:
OpenSans.ttf - Regular weight
OpenSans-Italic.ttf - Regular weight, Italic style
OpenSans-Light.ttf - Light weight
OpenSans-LightItalic.ttf - Light weight, Italic style
OpenSans-SemiBold.ttf - Semi-bold weight
OpenSans-SemiBoldItalic.ttf - Semi-bold weight, Italic style
@RidaRidss
RidaRidss / debug certificate fingerprint for windows
Created May 7, 2018 16:37
debug certificate fingerprint for windows
goto cmd and write command:
==========================
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
@RidaRidss
RidaRidss / Error : connect ETIMEDOUT
Created April 28, 2018 17:32
Fixes for npm registry while init react app
Unexpected Output
=================
C:\Users\Rida\Documents\start>react-native init sample
This will walk you through creating a new React Native project in C:\Users\Rida\Documents\start\sample
Using yarn v1.2.1
Installing react-native...
yarn add v1.2.1
warning ..\..\..\package.json: No license field
info No lockfile found.
[1/4] Resolving packages...