Skip to content

Instantly share code, notes, and snippets.

@Pomax
Pomax / browse.js
Created March 10, 2015 02:56
Save as "browse.js", run with "node browse", instant image folder browser. Because I'm lazy
/**
* First things first: I am *lazy*. I will write a tool to do the thing I want to
* do so I don't have to do it a second time, ever. Or until a new programming
* language comes around. Generally the latter, but enough about that:
*
* This is a Node.js utility for taking the dir you are in right now, firing up
* an express server, and giving you image browsing on localhost:8080 with simple
* left/right controls once you're actually viewing images, and "up" control to
* go up a directory.
*
@Pomax
Pomax / rgbhanalysis.js
Last active November 18, 2024 07:53
Sort a collection of images based on their dominant hue, and show the rgb+h analysis in a nice little image alongside.
(function bookmarklet(window) {
var document = window.document;
var body = document.body;
/**
* Sort a collection of images based on their dominant hue,
* and show the rgb+h analysis in a nice little image alongside.
*
* for instance, use this bookmarklet on