Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
samueljmurray / OkHttpCertPin.java
Last active August 26, 2021 08:22
Certificate pinning in React Native Android
package com.example.app;
import com.facebook.react.modules.network.OkHttpClientFactory;
import com.facebook.react.modules.network.OkHttpClientProvider;
import com.facebook.react.modules.network.ReactCookieJarContainer;
import java.util.concurrent.TimeUnit;
import okhttp3.CertificatePinner;
import okhttp3.OkHttpClient;
import { Dimensions, Platform } from 'react-native';
export const isIphoneX = () => {
const { height, width } = Dimensions.get('window');
return Platform.OS === 'ios' && (height === 812 || width === 812)
}
@estorgio
estorgio / prettier-eslint-precommit.md
Last active April 21, 2024 09:52
Setting up Prettier and ESLint with pre-commit hook

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env