Skip to content

Instantly share code, notes, and snippets.

View victorquinn's full-sized avatar
🏗️
Building awesome teams, software, and systems architecture

Victor Quinn victorquinn

🏗️
Building awesome teams, software, and systems architecture
View GitHub Profile
Verifying that "victor.id" is my Blockstack ID. https://onename.com/victor
@victorquinn
victorquinn / VolumeAdjust.applescript
Last active February 10, 2018 07:26
Alfred Adjust Volume Applescript
on alfred_script(q)
set tmp to splitString(q, " ")
set q to item 1 of tmp
if length of tmp is 2 then
set change to item 2 of tmp
else
set change to 10
end if
set current to output volume of (get volume settings)
@victorquinn
victorquinn / promise_while_loop.js
Last active March 30, 2023 04:29
Promise "loop" using the Bluebird library
var Promise = require('bluebird');
var promiseWhile = function(condition, action) {
var resolver = Promise.defer();
var loop = function() {
if (!condition()) return resolver.resolve();
return Promise.cast(action())
.then(loop)
.catch(resolver.reject);