Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🔥 Firebase-ing all over the GitHubs

Sam Stern samtstern

💭
🔥 Firebase-ing all over the GitHubs
  • Google
View GitHub Profile
@samtstern
samtstern / index.js
Created Jan 13, 2021
Firestore Bulk Writer Delete
View index.js
const admin = require('firebase-admin');
// TODO(you): Change this to match your Project ID
admin.initializeApp({
projectId: "YOUR-PROJECT-ID"
});
const READ_BATCH_SIZE = 250;
const db = admin.firestore();
@samtstern
samtstern / MainActivity.java
Last active Sep 18, 2018
FirebaseUI-Android#1447
View MainActivity.java
package com.firebase.example.firebaseui1447;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
@samtstern
samtstern / build.gradle
Created May 17, 2018
Google Services Plugin
View build.gradle
android {
// ...
}
apply plugin: 'com.google.gms.google-services'
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.firebase.quickstart.invisibleactivitytest">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
View gist:77d5055720f240137c82047166da827f
//
// ViewController.swift
// testProjectforFirebase
//
// Created by Jacob Platin on 8/11/16.
// Copyright © 2016 Jacob Platin. All rights reserved.
//
import UIKit
import Firebase
@samtstern
samtstern / FirebaseImageLoader.java
Last active Jan 7, 2018
StorageReference + Glide
View FirebaseImageLoader.java
package com.firebase.ui.storage.images;
import android.util.Log;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.data.DataFetcher;
import com.bumptech.glide.load.model.stream.StreamModelLoader;
import com.google.android.gms.tasks.Tasks;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.StreamDownloadTask;
@samtstern
samtstern / HomeActivity.java
Created Jul 20, 2016
FirebaseRecyclerAdapter - ViewHolder with Context
View HomeActivity.java
public class HomeActivity extends Activity implements TodoListener {
private MyRecyclerAdapter mAdapter;
// ...
@Override
public void onCreate(Bundle savedInstanceState) {
// ...
@samtstern
samtstern / json_replace.py
Created Aug 26, 2014
Python JSON Tool for doog
View json_replace.py
import json
import sys
def main():
num_args = len(sys.argv)
if num_args < 4:
print 'Invalid arguments, should be <file> <key> <value>'
else:
file_name = sys.argv[1]