Skip to content

Instantly share code, notes, and snippets.

View gual's full-sized avatar

Gualberto Escalante gual

  • El Salvador
  • 20:19 (UTC -06:00)
  • X @gualdsk
View GitHub Profile
@gual
gual / wa_chat_history_export.js
Last active June 14, 2021 03:17
To export whatsapp chat history (text only)
// This needs to be run on the browser console with the corresponding chat selected
// on Whatsapp Web. It also needs to have the whole conversation loaded.
// It copies the conversation to the clipboard, change it as needed.
conversation = '';
msgElements = document.querySelectorAll('div.copyable-text:not(._2_1wd)');
for (let msgElement of msgElements) {
sender = msgElement.dataset.prePlainText;
@gual
gual / fb_token_ss_val.js
Created June 3, 2021 21:07
Firebase server side token validation
const firebaseAdmin = require('firebase-admin');
const token = 'token_complete';
console.log('Initializing app');
firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.applicationDefault(),
databaseURL: 'https://project-default-rtdb.firebaseio.com'
});
console.log('To verify');