Skip to content

Instantly share code, notes, and snippets.

View ranajahanzaib's full-sized avatar

Rana Jahanzaib ranajahanzaib

View GitHub Profile
@ranajahanzaib
ranajahanzaib / firebase.ts
Created February 15, 2026 13:26
Firestore with local cache
import {
initializeFirestore,
persistentLocalCache,
persistentMultipleTabManager,
} from 'firebase/firestore'
const app = initializeApp(firebaseConfig)
const auth = getAuth(app)
import React from "react";
function CollectionCard(props) {
let cols;
if (props.cols) {
cols = `col-${props.cols}`;
} else {
cols = "col-4";
}
return (
{
firstName: "Your First Name",
email: "Your Email Address",
message: "Your Message",
ip: "Your IP Address"
}
@ranajahanzaib
ranajahanzaib / main.cpp
Created March 18, 2019 15:30
Having Trouble with MySQL Connectors
#include <iostream>
#include <stdlib.h>
#include <mysql-cppconn/jdbc/mysql_connection.h>
#include <mysql-cppconn/jdbc/cppconn/driver.h>
#include <mysql-cppconn/jdbc/cppconn/exception.h>
#include <mysql-cppconn/jdbc/cppconn/resultset.h>
#include <mysql-cppconn/jdbc/cppconn/statement.h>
using namespace std;