Skip to content

Instantly share code, notes, and snippets.

@davideast
davideast / index.ts
Last active February 8, 2019 18:08
syncWithElements
// https://stackblitz.com/edit/typescript-h68plq?file=index.ts
import firebase from 'firebase/app';
import 'firebase/firestore';
import { syncWithElements } from './sync';
const app = firebase.initializeApp({ projectId: "alwaysbecaching" });
const unsub = syncWithElements(app, {
parent: document.querySelector('.container'),
@davideast
davideast / firestore.gs
Last active September 23, 2019 03:08
Export to Firestore in AppScript
function main() {
var sheet = SpreadsheetApp.getActiveSheet();
// This is set as the collection name
var sheetName = sheet.getName();
var properties = getProperties(sheet);
var records = getData(sheet);
var firestore = getFirestore();
exportToFirestore(firestore, sheetName, records, properties);
}
@davideast
davideast / bookmarklet.js
Created November 14, 2025 16:04
Dark Mode Bookmarklet
javascript:(function(){const id='gemini-dark-mode-script';if(document.getElementById(id)){document.getElementById(id).remove();}else{const css='html{filter:invert(1) hue-rotate(180deg);background:#fdfdfd}img,video,iframe,picture{filter:invert(1) hue-rotate(180deg)}';const style=document.createElement('style');style.id=id;style.textContent=css;document.head.appendChild(style);}})();