Skip to content

Instantly share code, notes, and snippets.

const Bagel = require('@bageldb/bagel-db')
const dev = new Bagel(process.env.DEV_TOKEN) // needs write access
const prod = new Bagel(process.env.PROD_TOKEN) // must have read access
// mark the collections you want to copy (ensure the tokens have the right permissions)
const collections =[
// "clients", "testimonials", ...
]
@nevehallon
nevehallon / 📊 Weekly development breakdown
Last active July 29, 2024 09:03
📊 Weekly development breakdown
Vue.js 8 hrs 54 mins █████████▒░░░░░░░░░░ 32.4%
Python 8 hrs 6 mins ████████▓░░░░░░░░░░░ 29.4%
TypeScript 7 hrs 33 mins ████████▒░░░░░░░░░░░ 27.4%
JSON 47 mins ███▒░░░░░░░░░░░░░░░░ 2.9%
@nevehallon
nevehallon / gist:803b735567b9ab69551c91c5e16d8b33
Created October 19, 2023 16:59
aggregationPipeline.dart
final aggSteps = [
{
"\$match": {
"region.itemRefID": "6268a16f964b7b20e3d6beb2",
"reportType.itemRefID": {"\$ne": "60fbda43f3b16318ac07c79c"},
"reportStatus._id": "c2rmj8223akg00drt34g",
},
},
{
import { AggregationOperatorsArg } from "@bageldb/bagel-db/dist/interfaces"
import { db } from "../bageldb"
// NOTE: currently only works with following version ! "@bageldb/bagel-db": "^0.4.30-beta.0.03",
const aggSteps: AggregationOperatorsArg = [
{
$match: {
activeJourneyId: {
$exists: true,
},