Skip to content

Instantly share code, notes, and snippets.

View firebase_setup.md

Firebase Setup For House Marketplace

  1. Create Firebase Project
  2. Create "web" app within firebase to get config values"
  3. Install firebase in your project "npm i firebase
  4. Create a config file in your project
  5. Add authentication for email/password and Google
  6. Create a user from Firebase
  7. Enable Firestore
  8. Add rules for firestore
@bradtraversy
bradtraversy / firebase_rules.txt
Last active March 24, 2023 05:17
Firebase rules for house marketplace app
View firebase_rules.txt
// FIRESTORE RULES
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Listings
match /listings/{listing} {
allow read;
allow create: if request.auth != null && request.resource.data.imgUrls.size() < 7;
allow delete: if resource.data.userRef == request.auth.uid;
@warroyo
warroyo / override-rbac.yml
Created January 5, 2021 17:11
override rbac
View override-rbac.yml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: wcp:administrators:override
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
@gustavobeavis
gustavobeavis / alias.sh
Created March 28, 2016 12:57
pbcopy for ubuntu
View alias.sh
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'