Skip to content

Instantly share code, notes, and snippets.

View RedstoneWizard22's full-sized avatar
🏳️‍⚧️

Lilian RedstoneWizard22

🏳️‍⚧️
View GitHub Profile
@soulsoiledit
soulsoiledit / identifiers.md
Created March 31, 2024 05:56
Spotify Album Cover Image URL Quality Identifiers

Spotify Album Cover URLs are of the form https://i.scdn.co/image/ab67616d0000 + {quality identifier} + {image id}

The default seems to be b273, providing a ~640px JPEG. To get a different size or format, use one of the identifiers (maybe not exhaustive).

WEBP:

01e7: 64x64
11eb: 64x64
54be: 64x64
@bg5sbk
bg5sbk / str_replace.c
Created April 18, 2014 18:30
replace string in C
// fork from https://github.com/irl/la-cucina/blob/master/str_replace.c
char* str_replace(char* string, const char* substr, const char* replacement) {
char* tok = NULL;
char* newstr = NULL;
char* oldstr = NULL;
int oldstr_len = 0;
int substr_len = 0;
int replacement_len = 0;
newstr = strdup(string);