JSFiddle

  • Paginate in Firebase Database

    jQuery 3.2.1, HTML, CSS, JavaScript

    class Cursor {
       constructor(baseRef, pageSize) {
          this.baseRef = baseRef;
          this.lastKey = null;
          this.lastValue = null;
          this.pageSize = pageSize;
       }
       
       next() {
         let ref ...
  • Perf test for once() on 1k records #9 is the latest revision

    Test perf of individual lookups.

    $(() => {
      const URL = "https://kato-bigdata.firebaseio.com";
    
      // Initialize Firebase
      const config = {
        apiKey: "AIzaSyCNjdzYB6_5pR4UFH878ggyeKnEmHp8On8",
        authDomain: "kato-bigdata.firebaseapp.com",
        databaseURL: URL
      };
      firebase.initializeApp ...
  • Firebase Database Query Sandbox #25 is the latest revision

    Create queries, see the syntax, and run them.

    jQuery(function($) {
      let QUERY_FIELDS = ['orderByChild', 'startAt', 'endAt', 'limitToFirst', 'limitToLast'];
      let COOKIE_FIELDS = ['apiKey', 'url', 'print_curl', 'output_json'];
      let $out = $('[data-id=out]');
      let ...
  • Auth template

    Simple auth template using email/password auth

    jQuery(function($) {
      firebase.initializeApp({
        apiKey: "AIzaSyCktxUp-JovGV7Sw7dT9defEV-VwdmGe8E",
        authDomain: "kato-sandbox.firebaseapp.com",
        databaseURL: "https://kato-sandbox.firebaseio.com"
      });
      
      let $pre = $('pre');
      let $button ...
  • Auth template

    Simple auth template using email/password auth

    jQuery(function($) {
      firebase.initializeApp({
        apiKey: "AIzaSyCktxUp-JovGV7Sw7dT9defEV-VwdmGe8E",
        authDomain: "kato-sandbox.firebaseapp.com",
        databaseURL: "https://kato-sandbox.firebaseio.com"
      });
      
      let $pre = $('pre');
      let $button ...
  • Stress test at 50hz #9 is the latest revision

    Test Firebase performance at 50 ops/second.

    jQuery(function($) {
      firebase.initializeApp({
        databaseURL: "https://kato-bug.firebaseio.com"
      });
      var DB = firebase.database().ref("fiddle/katowulf/7s609r66");
      var OPS_PER_SECOND = 50 ...
  • Log output of AngularFire's $getAuth() function

    AngularJS 1.4.8, HTML, CSS, JavaScript

    // Set the configuration for your app
    var config = {
        apiKey: "AIzaSyCktxUp-JovGV7Sw7dT9defEV-VwdmGe8E",
        authDomain: "kato-sandbox.firebaseapp.com",
        databaseURL: "https://kato-sandbox.firebaseio.com"
      };
    firebase ...
  • Stress test at 50hz

    Test Firebase performance at 50 ops/second.

    jQuery(function($) {
      firebase.initializeApp({
        databaseURL: "https://kato-bug.firebaseio.com"
      });
      var DB = firebase.database().ref("fiddle/katowulf/7s609r66");
      var OPS_PER_SECOND = 50 ...
  • Paginator class (3.x SDK)

    A Simple Paginator for Firebase Database.

    /***************************
      A SIMPLE PAGINATOR
      
      Note that this paginator assumes the data is 
      append-only. If data will be deleted from the list ...
  • Example Flashlight query with limit #3 is the latest revision

    jQuery 3.1.1, HTML, CSS, JavaScript

    (function ($) {
      "use strict";
    
      /**====== SET ME =====**/
      /**====== SET ME =====**/
      /**====== SET ME =====**/
      // Set the configuration for your app
      // TODO: Replace with your project ...