Skip to content

Instantly share code, notes, and snippets.

View minimal-scouser's full-sized avatar

Syed Pasha minimal-scouser

View GitHub Profile
@minimal-scouser
minimal-scouser / index.ts
Created March 13, 2025 13:42
Create labelmap segmentations from a nifti mask file
// load the mask file as a volume
const maskUrl = 'mask-url'
const imageIds = await createNiftiImageIdsAndCacheMetadata({
url: maskUrl,
})
const maskVolumeId = 'mask-volume-nifti'
const maskVolume = await volumeLoader.createAndCacheVolume(maskVolumeId, {
imageIds,
@minimal-scouser
minimal-scouser / readme.md
Last active October 15, 2023 03:04
My thoughts on what makes a website bearable

I aimed to compile a list of the frustrating experiences I encounter while navigating the web. I hope that this list can serve as a personal reminder to create more user-friendly websites.

  1. When text is excessively truncated, it's beneficial to display ellipses (...) and include a title attribute. Please keep in mind that the title attribute might not be effective for mobile users and those relying on assistive devices. In such cases, consider using aria-* attributes instead. ref
  2. If you use an icon button without any accompanying text, it's advisable to include a title attribute. The same caution applies in this scenario, as the title attribute may not be fully useful for mobile users or individuals using assistive technologies.
@minimal-scouser
minimal-scouser / index.ts
Last active February 10, 2022 04:21
A way of accessing objects from functions.
// So I realised this was just a candidate fn. Nothing novel about it.
(function () {
'use strict';
var res = { data: [] };
function check(obj: Object, fn: Function) {
return fn.call(obj)
}