Skip to content

Instantly share code, notes, and snippets.

View benlesh's full-sized avatar
🐶
☕ 🔥 🔥 this is fine

Ben Lesh benlesh

🐶
☕ 🔥 🔥 this is fine
View GitHub Profile
const source$ = Observable.interval(1000).take(3); // 0, 1, 2
// waits 3 seconds, then logs "2".
// because the observable takes 3 seconds to complete, and
// the interval emits incremented numbers starting at 0
async function test() {
console.log(await source$.toPromise());
}
@benlesh
benlesh / README.md
Last active May 8, 2019 18:49
Valid JS Identifiers JSON

All Valid JS Identifiers As JSON

Created by fiddling with code written by Mathias Bynens for https://mothereff.in/js-variables

MIT License from his project should be honored.

@benlesh
benlesh / convert-wav-to-mp3.bat
Created June 20, 2023 14:15
Convert all WAV files in a directory to MP3 files.
REM NOTE that this does NOT uninstall ffmpeg when done
@echo off
setlocal enabledelayedexpansion
echo Current directory: %cd%
REM Set the download URL for FFmpeg
set "ffmpeg_url=https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip"