Skip to content

Instantly share code, notes, and snippets.

View vaibhavgehani's full-sized avatar

Vaibhav Gehani vaibhavgehani

View GitHub Profile
import React, { Fragment, Component, useState } from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Image,
Button,
const launchNativeImageLibrary = () => {
let options = {
includeBase64: true,
storageOptions: {
skipBackup: true,
path: 'images',
},
};
launchImageLibrary(options, (response) => {
console.log('Response = ', response);
const launchNativeCamera = () => {
let options = {
includeBase64: true,
storageOptions: {
skipBackup: true,
path: 'images',
},
};
launchCamera(options, (response) => {
console.log('Response = ', response);
const express = require("express");
const app = express();
const bodyParser = require('body-parser');
const cors = require("cors")
const route = process.env.PORT || 3000;
// import firebase-admin package
const admin = require('firebase-admin');
// import service account file (helps to know the firebase project details)
{
"name": "cordovaToCapacitor",
"version": "2.1.0",
"author": "Enappd",
"homepage": "https://enappd.com",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'com.example.app',
appName: 'cordovaToCapacitor',
webDir: 'www',
bundledWebRuntime: false,
plugins: {
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'com.example.app',
appName: 'cordovaToCapacitor',
webDir: 'www',
bundledWebRuntime: false,
cordova: {
preferences: {
ScrollEnabled: 'false',
{
"name": "cordovaToCapacitor",
"version": "2.1.0",
"author": "Enappd",
"homepage": "https://enappd.com",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
const functions = require('firebase-functions');
const { google } = require('googleapis');
const sheets = google.sheets('v4')
const spreadsheetId = 'your_spread_sheet_id'
const serviceAccount = require('./serviceAccount.json')
// Required for authentication
const jwtClient = new google.auth.JWT({
email: serviceAccount.client_email,
key: serviceAccount.private_key,
function getEnvironment() {
var environment = {
spreadsheetID: "your_spread_sheet_id",
firebaseUrl: "your_realtime_database_url"
};
return environment;
}
// Creates a Google Sheets on change trigger for the specific sheet
function createSpreadsheetEditTrigger(sheetID) {