Skip to content

Instantly share code, notes, and snippets.

View alan89's full-sized avatar
💭
Everything on its right place

Alan Escobar alan89

💭
Everything on its right place
View GitHub Profile
const admin = require('firebase-admin');
// expects the environment variable GOOGLE_APPLICATION_CREDENTIALS
const serviceAccount = require(process.env.GOOGLE_APPLICATION_CREDENTIALS);
const credential = admin.credential.cert(serviceAccount);
const PROJECT_ID = '<FIREBASE_PROJECT_ID>';
const app = admin.initializeApp({
credential: credential
@torresalmonte
torresalmonte / index.js
Created November 27, 2019 18:11
Script to delete Storage rulesets using the "firebaserules" REST API
const admin = require('firebase-admin');
const {sleep} = require('sleep');
// asumes the existance of the GOOGLE_APPLICATION_CREDENCIAL env variable
const firebaseApp = admin.initializeApp();
async function getRulesets(projectId, firebaseApp, pageToken) {
pageToken = pageToken || '';
@mbleigh
mbleigh / README.md
Last active November 3, 2024 19:49
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
@jaromero
jaromero / commit-guidelines.md
Last active August 25, 2016 00:36
Commit message guidelines

Commit Message Guidelines

These guidelines are meant to be a simple, effective way to quickly discern the type of contribution in our projects, as well as an attempt to enforce limiting commits to a single topic and avoid unwieldy commits

It's based on Angular's contribution guidelines, and this document about commit messages in general. I suggest that you give them a read, too.

The general idea

A commit message consists of, at the very least, the summary. It may also include a body, separated from the summary by a blank line.