Skip to content

Instantly share code, notes, and snippets.

View toni-sharpe's full-sized avatar

Toni Leigh Sharpe toni-sharpe

View GitHub Profile
@toni-sharpe
toni-sharpe / gist:3267d072837e40322b8924e7718b160a
Last active December 13, 2024 20:28
Keys using C as an example

Single Major Key

piano keyboard

       1  2  3  4  5  6  7  8  9  10 11 12 1^ 2^ 3^ 4^ 5^ 6^
       W  B  W  B  W  W  B  W  B  W  B  W  W  B  W  B  W  W
       C  C# D  D# E  F  F# G  G# A  A# B  C^ C#^D^ D#^E^ F^
       |     |     |  |     |     |     |  |     |     |  |
       |     |     |  |     |     |     |  |     |     |  |

Scale of C Major, with 1 - 7 (1st, 2nd, 5th, etc.) followed

@toni-sharpe
toni-sharpe / jest-mock-eg.js
Created July 5, 2019 07:09
Jest Mock Module Example
// Path to the module to mock
// Then function which is called when the module is accessed
jest.mock("../mocked-module", () => ({
// Allows for multiple exports and a default to be mocked out individually
__esModule: true,
// Immediately returning the args like this is a substitute for inspecting the calledWith
// on a mock (Jest mock does not allow access to surrounding variables like a closure would)
default: jest.fn(args => args),
API_METHOD: { POST: "POST" }
}));
@toni-sharpe
toni-sharpe / linux-teardown.sh
Last active May 3, 2018 12:41
linux-teardown.sh
# curl -fsSL <url_for_raw_version_of_this_gist> | bash
# ensure you're in the root
cd ~
# Back up the notes , sublime-projects and ui-snippets folders
cp -r ~/notes /media/psf/Home/dev/parallels
cp -r ~/sublime-projects /media/psf/Home/dev/parallels
cp -r ~/ui-snippets /media/psf/Home/dev/parallels