Skip to content

Instantly share code, notes, and snippets.

@adriancuadrado
adriancuadrado / export.js
Created July 11, 2022 23:03
Import/export indexedDB database
View export.js
(() => {
indexedDB.open('postman-app').onsuccess = async event => {
let db = event.target.result;
let transaction = db.transaction(db.objectStoreNames);
// TODO: Create and download a file instead of outputting the contents
console.log(
Object.fromEntries(
await Promise.all(
[...db.objectStoreNames]
.map(
@adriancuadrado
adriancuadrado / 00_export_history.js
Last active February 23, 2023 08:52
Scripts to import/export Postman's history
View 00_export_history.js
(async function() {
const filename = 'postman-history-export.json';
const download = (function() {
const element = document.createElement('a');
return function(filename, contents) {
element.setAttribute('href', URL.createObjectURL(new Blob([contents])));
element.setAttribute('download', filename);
element.click();
@adriancuadrado
adriancuadrado / style.css
Last active June 23, 2021 09:36
CSS for less youtube distractions
View style.css
/*
Download a plugin for your browser to load custom css, then use this to hide all youtube recomendations and avoid distractions.
For instance, you can download Stylebot: https://stylebot.dev/
*/
div.style-scope.ytd-rich-grid-renderer {
display: none;
}
div.style-scope.ytd-compact-video-renderer {