Skip to content

Instantly share code, notes, and snippets.

adriancuadrado / style.css
Last active June 23, 2021 09:36
CSS for less youtube distractions
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:
*/ {
display: none;
} {
adriancuadrado / export.js
Created July 11, 2022 23:03
Import/export indexedDB database
(() => {'postman-app').onsuccess = async event => {
let db =;
let transaction = db.transaction(db.objectStoreNames);
// TODO: Create and download a file instead of outputting the contents
await Promise.all(
adriancuadrado / 00_export_history.js
Last active February 23, 2023 08:52
Scripts to import/export Postman's history
(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);;
adriancuadrado / gist:5c3b2dd63e21908a64812412cd30b23a
Last active October 4, 2023 10:08
How to get started with React Native in a real device
  1. Follow the instructions from React Native's documentation
  2. Make 1000% sure the USB cable works for this and not just charging. Not all of them do apparently.
  3. Execute this with the USB cable connected:
    adb kill-server
    adb tcpip 5555
    adb connect <your-android-device-ip-address-or-network-name>:5555

    You only need to execute the 2 first steps once and the last one every time your computer boots up

  4. Open the 'android' folder with Android Studio and let it download and install the gradle dependencies.
adriancuadrado / msal-cheatsheet.js
Last active November 7, 2023 20:20
MSAL.js cheatsheet
// Initialization
const myMSALObj = new msal.PublicClientApplication({
auth: {
clientId: "c993fdd7-f80e-4586-bd81-8753a1f3e5ac", // This is the ONLY mandatory field; everything else is optional.
authority: "", // Choose sign-up/sign-in user-flow as your default.
knownAuthorities: [''], // You must identify your tenant's domain as a known authority.
redirectUri: "http://localhost:6420" // You must register this URI on Azure Portal/App Registration. Defaults to "window.location.href".
cache: {
cacheLocation: "sessionStorage", // Configures cache location. "sessionStorage" is more secure, but "localStorage" gives you SSO between tabs.