Skip to content

Instantly share code, notes, and snippets.

@daominhsangvn
daominhsangvn / deploy-front-end-nodejs-to-aws-ec2-linux.md
Last active September 27, 2017 07:16 — forked from hpphat92/GUIDELINE_AWS.md
How to deploy front-end (AngularJS, Angular, ReactJS...) and nodejs to AWS EC2 Linux

How to deploy front-end (AngularJS, Angular, ReactJS...) and nodejs to AWS EC2 Linux

Preparation

  • PEM file containing private key from AWS server.
  • A domain to server
  • GIT Bash (In Window, can't use command line tool or powershell).

Steps:

Step 1: Connect to server:

@daominhsangvn
daominhsangvn / react-native-style-guide.md
Last active March 3, 2022 19:26
React-Native Style Guide
@daominhsangvn
daominhsangvn / gist:9f2e4419d1f1d02b60c3ddf3febecfdb
Created July 14, 2017 03:09
FilesCollection Http method for React-Native
Install `$ meteor add meteorhacks:picker` first
```
import {Meteor} from 'meteor/meteor';
import {Accounts} from 'meteor/accounts-base';
import {FilesCollection} from 'meteor/ostrio:files';
export const MyFiles = new FilesCollection({
collectionName: 'MyFiles',
allowClientCode: true,
@daominhsangvn
daominhsangvn / gist:454388252d541fbbc8b41c622c3c4e76
Created May 30, 2017 08:22 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@daominhsangvn
daominhsangvn / gist:f2d369ab4aafe9783e96fbe05285cfbd
Last active September 16, 2022 19:12
Push Notifications in React-Native with FireBase
  1. Add new App in Firebase Console, select iOS and follow exactly instruction. 1a. In the GoogleService-Info.plist step, after download the file, open xCode, in Project Navigator right click Supporting folder and select Add files to ... then select the downloaded file.
  2. Following this to create App Id, APNs (.p8) and Provisioning Profile for iOS: https://firebase.google.com/docs/cloud-messaging/ios/certs 2a. Add APN file (.p8) to Firebase App
  3. Edit Podfile, add following below pod 'Firebase/Core': pod 'Firebase/Messaging' then $ pod install again
  4. Install react-native-fcm module then rnpm link react-native-fcm
  5. Following this https://github.com/evollu/react-native-fcm#shared-steps and this https://github.com/evollu/react-native-fcm#xcode-post-installation-steps
  6. Write Component to handle Push Notifications:
# main.js