Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Created February 16, 2013 17:58
Show Gist options
  • Save danlamanna/4967943 to your computer and use it in GitHub Desktop.
Save danlamanna/4967943 to your computer and use it in GitHub Desktop.
interactive("assembla-spot-check-space-urls", "Loads n URLs with random space IDs.",
function assembla_spot_check(I) {
var url_format = yield I.minibuffer.read($prompt = "Assembla URL (with %s where space-id should belong): ");
var num_spaces = yield I.minibuffer.read($prompt = "Number of spot checks: ");
if (num_spaces > assembla_space_ids.length) {
I.window.minibuffer.message("Number of spot checks exceeds number of space IDs known, performing " + assembla_space_ids.length + " instead.");
num_spaces = assembla_space_ids.length;
}
for (i=0;i<num_spaces;i++) {
load_url_in_new_buffer(url_format.replace("%s",
assembla_space_ids[Math.floor(Math.random()*assembla_space_ids.length)]);
}
I.window.minibuffer.message("Opened " + num_spaces + " new buffers.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment