- Install the 32-bit version of Node
- Install Python 2.7
- Install Microsoft Visual Studio 2015 Community
- Install Windows 8.1 SDK
- Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
- setx PYTHON C:\Python27\python.exe /m
- (May need to change path to your custom install directory.)
- setx PYTHON C:\Python27\python.exe /m
- Open a new command prompt and run the following command; if it runs without any errors the configuration for node-gyp builds is succesful.
- npm install -g node-gyp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const excludedTitles = ['A title I already own', 'Got this other title too']; | |
const { includedKeysCombined, csv } = run(excludedTitles); | |
copy(includedKeysCombined); | |
function scrapeTitlesAndKeys() { | |
const result = []; | |
// Get all elements with classes "key-redeemer" (Normal key pages), and "multiselect-nonimage-content" (Choice key pages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getNoteDistanceFromC0 = note => { | |
// Notes in an octave | |
const noteNumberMap = { "C": 1, "C#": 2, "D♭": 2, "D": 3, "D#": 4, "E♭": 4, "E": 5, "F": 6, "F#": 7, "G♭": 7, "G": 8, "G#": 9, "A♭": 9, "A": 10, "A#": 11, "B♭": 11, "B": 12 }; | |
const getOctaveNum = note => note.charAt(note.length - 1); | |
return noteNumberMap[note.slice(0, -1)] - 1 + (getOctaveNum(note) * 12); | |
}; | |
const getOctaveRange = (note1, note2) => | |
(getNoteDistanceFromC0(note2) - getNoteDistanceFromC0(note1)) / 12; |
I hereby claim:
- I am fatman- on github.
- I am saiki (https://keybase.io/saiki) on keybase.
- I have a public key ASB2nV_1TkWE8eM4Gh63zaRpjDzzl6T7ocNGi6iBOR70Qwo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const clover = () => { | |
const emoji = ['☘️', '🍀']; | |
const pick = Math.floor(Math.random() * 2); | |
const depth = Math.floor(Math.random() * 100); | |
const tag = document.createElement('div'); | |
tag.innerHTML = emoji[pick]; | |
tag.style.zIndex = depth; | |
tag.style.opacity = depth / 100; | |
tag.style.fontSize = `${depth}pt`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let totalMinutes = 0; | |
let totalSeconds = 0; | |
Array | |
.from(document.querySelectorAll('.lecture__item__link__time')) | |
.map(item => item.innerHTML) | |
.forEach(itemTime => { | |
totalMinutes += parseInt(itemTime.split(':')[0]); | |
totalSeconds += parseInt(itemTime.split(':')[1]); | |
}); |