# Install AVD files
yes | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-29;default;x86'
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
# Create emulator
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP -d pixel --package 'system-images;android-29;default;x86' --force
$ANDROID_HOME/emulator/emulator -list-avds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/react-native-community/releases/issues/214#issuecomment-791487871 |
For npm packages that don't provide arm binaries:
npm i --target_arch=x64
For gradle packages that don't provide arm binaries:
// for apple m1, please add protoc_platform=osx-x86_64 in $HOME/.gradle/gradle.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nowrap | |
" Make vim more useful | |
set nocompatible | |
" Enhance command-line completion | |
set wildmenu | |
" Allow cursor keys in insert mode | |
set esckeys | |
" Optimize for fast terminal connections | |
set ttyfast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create a new directory; | |
mkdir Apple\ Enterprise | |
cd Apple\ Enterprise | |
2. Generate a certificate signing request | |
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest | |
3. With the information like so (ensure you give it a password): | |
Country Name (2 letter code) [AU]:GB | |
State or Province Name (full name) [Some-State]:London |
Some pain points:
- HMR is not always practical for server side development. For example HMR interferes with the initialisation of
prom-client
(and probably other libs), and there's no way to configure the HMR behaviour in Next.js (at time of writing).- "Interferes" meaning exceptions are thrown due to a "singleton" class being instantiated twice
- If you're using TypeScript, you'll need a completely seperate build process for server code:
- Generated server files are not part of the next build (ie don't exist within
.next
) - this is a pain when deploying or adding to a docker image
- Generated server files are not part of the next build (ie don't exist within
- If you're consuming common code across the custom server and Next.js build, you're going to have 2 different compiled versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14.15.3-alpine AS builder | |
WORKDIR /app | |
ENV NPM_CONFIG_LOGLEVEL warn | |
ENV NPM_CONFIG_FUND false | |
ENV NPM_CONFIG_AUDIT false | |
ENV CI true | |
COPY package.json package-lock.json ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const net = require('net'); | |
const socketPath = '/tmp/my.unix.sock'; | |
const server = net | |
.createServer() | |
.on('connection', (stream) => { | |
console.log('Server: client connected'); | |
stream.setEncoding('utf-8'); |