Skip to content

Instantly share code, notes, and snippets.

View jkbockstael's full-sized avatar

Jean-Karim Bockstael jkbockstael

View GitHub Profile
// Equality
// equal :: a -> b -> boolean
function equal (a, b) {
if (typeof a !== typeof b) {
return false;
}
if (a === b) {
return true;
}
if (Array.isArray(a) && Array.isArray(b)) {
@jkbockstael
jkbockstael / AlbumsOrder.scpt
Created October 25, 2017 12:43
AppleScript to get iTunes to sort albums by release date
-- Fix albums display order
-- Changes the "sort album" field, to ensure that albums get displayed in chronological order on iPods.
-- CC-BY-NC 2011, Jean-Karim Bockstael,
tell application "iTunes"
-- input checking
if selection is {} then
display dialog "You must select at least a track"
return
else
set selected_tracks to selection