Skip to content

Instantly share code, notes, and snippets.

@skinkade
skinkade / field_names.clj
Last active May 20, 2023 19:21
Clojure reitit REST API - Automatic camelCase conversion, including swagger support
;; Copyright 2023 Shawn Kinkade
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
@skinkade
skinkade / spotify-playlist-csv-export.js
Created June 30, 2021 13:26
Export Spotify Playlist to CSV
// While browsing a playlist in your browser,
// i.e. browser address is https://open.spotify.com/playlist/{playlistId},
// copy/paste these functions into the browser console,
// then run exportCurrentPlaylist()
// It should prompt a download for:
// [Playlist name] - [Playlist ID].csv
// Containing:
// Song, Artist(s), Album, Song Link, Main Artist Link, Album Link
// Disclaimer: written quickly by a non-JS dev
@skinkade
skinkade / image-match.pl6
Created November 21, 2016 01:23
pHash utility in Perl6 to detect duplicate/similar images
use NativeCall;
### DCT hashing & Hamming
# int ph_dct_imagehash(const char* file,ulong64 &hash);
sub ph_dct_imagehash(Str, uint64 is rw)
is native('pHash', v0)
returns int16
{ * }