Skip to content

Instantly share code, notes, and snippets.

@Dobby89
Dobby89 / outlook.md
Last active June 30, 2023 12:11
Fix Outlook Inbox Layout

Fix Outlook Inbox Layout

Answer source

Change from this Inbox layout:

image

To this Inbox layout:

@Dobby89
Dobby89 / fiddler.md
Last active April 13, 2022 08:25
Fiddler autresponder rules
@Dobby89
Dobby89 / yt-dlp.md
Created February 2, 2022 20:23
How to download youtube videos

Download youtube videos through command line

Download the 3rd to 8th, and 10th video from a playlist

yt-dlp.exe --download-archive "C:/directory/archive.txt" -o "C:/directory/%(title)s [%(id)s].%(ext)s" --ignore-config --hls-prefer-native "https://www.youtube.com/playlist?list=[PLAYLIST_ID]" --playlist-items 3-8,10

Download an individual video

@Dobby89
Dobby89 / git-commands.md
Last active April 26, 2024 12:36
Git commands

Delete all local branches which have already been merged into master (or have no commits)

git branch --merged master | grep -v "master" | xargs -n 1 git branch -d

As a standalone function, Add the following to "C:\Users<user>.bashrc"

deleteOldLocalBranches() {
@Dobby89
Dobby89 / Commands.md
Last active April 9, 2024 12:29
Jest / React Testing Library

Only run tests against files which have been changed (--passWithNoTests used in case no tested files have changed)

jest --onlyChanged --passWithNoTests
@Dobby89
Dobby89 / SSLcertificate.md
Created November 1, 2021 08:57
Generate SSL certificate for a folder
@Dobby89
Dobby89 / helpers.md
Last active January 17, 2024 08:56
Typescript snippets

Helpers

Get a unique array

An array of primitives

[...new Set([1, 1, 2, 3])] // [1, 2, 3]
@Dobby89
Dobby89 / How (best) to install Node on Windows.md
Last active February 15, 2022 11:29
How to install Node on your Windows computer

How (best) to Install Node on Windows

Using NVM to have multiple versions of Node on your machine.

Background

You might have multiple projects on your system, which can all potentially require different and very specific versions of Node.js to run.

In order to make sure we can develop each project locally, we need to be able to set which versions of Node our machines are using for that particular project.

@Dobby89
Dobby89 / cypress.js
Created June 11, 2021 07:56
Cypress snippets
// Check how many requests were made to a particular endpoint
// https://stackoverflow.com/a/55604505/5243574
cy.intercept({
method: 'POST',
url: 'myUrl',
}, {
body: {}
}).as('myStubName');
cy.get('@myStubName.all').should('have.length', 0);