Skip to content

Instantly share code, notes, and snippets.

@ogallagher
ogallagher / spotify-lyrics-transcript-focus-view.js
Last active October 13, 2024 15:00
Modify Spotify webplayer frontend to show only the lyrics/transcript and playback controls
/**
* Modify Spotify webplayer interface to show only the lyrics/transcript
* and footer bar with playback and miscellaneous controls.
*
* Compatibility tests:
* - Chrome 2024-10-12
*/
// remove minimum width,height from
// https://open.spotifycdn.com/cdn/build/web-player/web-player.f352977c.css
@ogallagher
ogallagher / nlp_api_client.mjs
Last active February 19, 2024 16:10
Sandbox testing of natural language processing APIs
/**
* Test natural language APIs.
* - cloudmersive
* - detect language
* - tag parts of speech (POS)
*/
import dotenv from 'dotenv'
import cm from 'cloudmersive-validate-api-client'
import cm_nlp from 'cloudmersive-nlp-api-client'
@ogallagher
ogallagher / splitwise_logo_notext.svg
Created May 9, 2023 01:22
Splitwise logo (turquoise and gray open envelope) without text
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ogallagher
ogallagher / combinate.js
Created June 10, 2021 18:33
Generate combinations using elements from an array
function combinations(options,places) {
// options is array
// places is positive int
if (places <= 1) {
let c = []
for (let o of options) {
c.push([o])
}
@ogallagher
ogallagher / permute.py
Last active December 31, 2020 06:51
Generate permutations in python
# dependencies
from typing import Union, List, Generator
# permute method
def permute(options:Union[str,List], places:int=None) -> Generator[List,None,None]:
"""Generate all permutations recursively.
Args: