Firebase Cheat Sheet



  1. Firebase Cheat Sheet Download
  2. Firebase Cheat Sheet
  3. Firebase-tools Cheat Sheet

Regular Expressions are notoriously difficult to learn - they have a very compact syntax that ends up looking like gibberish. However, they can be extremely powerful when it comes to form validation, find and replace tasks, and/or searching through a body of text. The following cheatsheet provides common RegEx examples and techniques for the JavaScript developer.

14.3k members in the Firebase community. Community supported discussions on Google's Firebase platform. Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts. User account menu. I wrote a cheatsheet for Firestore beginners. Firebase Realtime Database Cheat Sheet This page lists down different Swift code snippets which demonstrate how to work with Firebase Realtime Database. I like to have this page handy when working a mobile app for iOS platform with Swift and Firebase. Set up Firebase Realtime Database. Follow us on Facebook:- https://m.facebook.com/Technokidz20s/?viewpublicfor=20163.

🔥 There are several awesome tools that can help you debug RegEx in the browser - my personal favorite is RegExr.

  1. Cheat sheet; Now that our application is configured to use our new Firebase database, let's learn how to save data to it. In this lesson we'll create our first Firebase objects and nodes which will allow us to write data to our database.
  2. Cheat sheet Now that users can successfully save their favorite restaurants to Firebase, let's make sure they can view the list of restaurants they've saved. To do this, we'll integrate another open source library called FirebaseUI-Android.

How do you Pronounce RegEx?

Much like Gif vs Jif, the proper pronunciation of RegEx is passionately debated among developers. Based on my limited twitter poll, in looks like most prefer the hard G over the soft J.

Before I make a video about Regular Expressions... How do you pronounce it?

— fireship.io (@fireship_dev) May 18, 2020

Regex Reference

Basics

  • / expression / flags, i.e /[A-Z]+/g basic format
  • / hello?*/ escape special characters with backslashes
  • () group with parentheses
  • | logical OR

Character classes

  • w word d digit s whitespace (tabs, line breaks)
  • W NOT word D NOT digit S NOT whitespace
  • t tabs, n line breaks
  • . any character (except newline)

Brackets

  • [xyz] match any x, y, z
  • [J-Z] match any capital letters between J & Z.
  • [^xyz] NOT x, y, z

Quantification

  • bob|alice match bob or alice
  • z? zero or one occurrences
  • z* zero or multiple occurrences
  • z+ one or multiple occurrences
  • z{n} n occurrences
  • z{min,max} min/max occurrences

Anchors

  • hello world exact match
  • ^hello start of the strings
  • world$ end of the string

How to Use RegEx in JavaScript

Create a Regular Expression

There are two ways to create a regular expression in JavaScript. The literal way is just a set of characters between two forward slashes / /.

You can also instantiate RegExp.

String Regex Functions

There are several ways to use a regular expression on a string primitive, such as (1) match all the occurrences, (2) search for the existence of a pattern, or (3) replace matches with a new value.

Common Examples

Password Validation

How do you validate the format of a password for a signup form? Let’s force passwords to contain a capital letter, lowercase letter, number, and min length of 8.

See full demo.

Hex Codes

How do you find all of the hex codes, such as CSS colors, in a document? Useful if you need to analyze the color scheme.

See full demo.

Remove HTML Tags

How do you remove all HTML tags from a document? Use the regex below to find and replace all HTML tags.

See full demo

Flutter Firebase Cheat Sheet covers firebase service for the rapid development of flutter applications such as Authentication, posting data and retrieving data from cloud firestore, Uploading an image(cloud storage) on firebase and Push notification(device to device and topic subscription) by firebase messaging.

Firebase is a development platform created by firebase which is currently managed google. firebase provides a variety of tools and services for rapid development.

Firebase cheat sheet download

We have to set up firebase SDK in flutter before using any of its services. create new Firebase project then select android plate form.

Enter app package name copy it from android/app/src/main/AndroidManifest.xml you can also give app nickname that is totally optional. but make sure of entering SHA-1 as it’s required for authentication. you can get your SHA-1 just copy the below code in the terminal for more details(client-auth).

1Flutter Firebase Authentication
1.1Email And Password-based Authentication
4Firebase Push notification(Cloud Messaging)

Mac/Linux

Firebase Cheat Sheet Download

Sheet

Windows

Download google_services.json

Firebase Cheat Sheet

Flutter Firebase Authentication

Authentication is required to be implemented in most of the applications for authorizing users to access flutter screens. firebase gives a variety of authentication options. In this blog email, password and phone authentication.

Add dependencies: firebase_auth: in pubspec.yaml file then install it by flutter pub get in your terminal and import ‘package:firebase_auth/firebase_auth.dart’; in your dart file.more detail(https://pub.dev/packages/firebase_auth#-installing-tab-)

Email And Password-based Authentication

Register User

Login user

Flutter Firebase Phone Authentication

Firebase phone authentication is the most common way for authenticating users. flutter firebase phone authentication is easy to implement.

Check current user detail

Flutter Firebase Cloud firestore

Firebase gives you the power of storing data in NoSQL formate.in cloud firestore we can perform complex Querys such as AND, OR, EQUAL TO very easily. data can be added modified or deleted in Flutter FirebaseCloud Firestore in realtime.

Add dependencies: cloud_firestore: in pubspec.yaml file then install it by flutter pub get in your terminal and import‘package:cloud_firestore/cloud_firestore.dart’;in your dart file more detail(cloud_firestore).

Add data

  • Update data
  • Delete data
  • Fetch data

Check if data exists in cloudfirestore!

Flutter Firebase Storage

For storing files in firebase provided its own storing services. In this Flutter Firebase Storage we will see how we can store the image in firebase storage for that we have to use one more plugin to get a file path either from the camera or gallery of the phone.

upload.dart

FirebasePush notification(Cloud Messaging)

We can send app notifications in a flutter by using a firebase cloud messaging service in a flutter. In this, we will see how we can send notifications from one device to another ie. device to device notification and notification with a topic subscription. we also need the Server key of cloud messaging you can get it from project settings in the cloud messaging tab.

Firebase-tools Cheat Sheet

Device to device notification

Before sending notification from one device to other we need to store the token in the database.

Topic Subscription

In topic subscription, we need to subscribe to a topic then send a notification on that topic added by the device.