This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * * * * * * * * * * * * * * * * | |
* First try | |
*/ | |
let {skip, secret} = getTestSecret('LICENSE') | |
tap.test('first test', {skip}, (t) => { | |
//... | |
}) | |
// Doesn't like the leading brace, thinks it's a code block | |
{skip, secret} = getTestSecret('OTHER_LICENSE') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! 7/4/2019 https://www.youtube.com | |
www.youtube.com##ytd-compact-video-renderer > #dismissible | |
www.youtube.com##ytd-compact-radio-renderer > #dismissible | |
www.youtube.com##ytd-compact-movie-renderer > #dismissible | |
www.youtube.com##.ytp-endscreen-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cleaner output, but same results without | |
const Promise = require('bluebird'); | |
// What is the best way to run async functions | |
// * in parallel | |
// * fail fast | |
// * not have unhandled promises | |
// * single failure path (try/catch) | |
// ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleepReject(time, msg) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => reject(msg || 'reject'), time); | |
}); | |
} | |
async function test() { | |
try { | |
let valuePromises1 = [1000, 2000, 3000].map(x => sleepReject(x)); | |
let valuePromises2 = [4000, 5000].map(x => sleepReject(x)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleepReject(time, msg) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => reject(msg || 'reject'), time); | |
}); | |
} | |
async function test() { | |
try { | |
let valuePromises1 = [1000, 2000, 3000].map(x => sleepReject(x)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleepReject(time, msg) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => reject(msg || 'reject'), time); | |
}); | |
} | |
async function test() { | |
try { | |
let valuePromises1 = [1000, 2000, 3000].map(x => sleepReject(x)); | |
let valuePromises2 = [4000, 5000].map(x => sleepReject(x)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function test() { | |
var p1 = new Promise((resolve, reject) => { | |
setTimeout(() => reject('one'), 1000); | |
}); | |
var p2 = new Promise((resolve, reject) => { | |
setTimeout(() => reject('two'), 2000); | |
}); | |
var p3 = new Promise((resolve, reject) => { | |
setTimeout(() => reject('three'), 3000); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! 7/1/2019 https://www.youtube.com | |
www.youtube.com###dismissable | |
www.youtube.com##.ytp-endscreen-content | |
www.youtube.com##ytd-compact-playlist-renderer.ytd-watch-next-secondary-results-renderer.style-scope | |
www.youtube.com##.use-ellipsis.ytd-watch-next-secondary-results-renderer.style-scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python: stdout/stderr (slack): Traceback (most recent call last): | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 133, in wrapper | |
python: stdout/stderr (slack): return f(data, current_buffer, *args, **kwargs) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 144, in wrapper | |
python: stdout/stderr (slack): return f(*decode_from_utf8(args), **decode_from_utf8(kwargs)) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 3868, in command_thread | |
python: stdout/stderr (slack): msg = get_msg_from_id(channel, args) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 3854, in get_msg_from_id | |
python: stdout/stderr (slack): return channel.hashed_messages.get(msg_id) | |
python: stdout/stderr (slack): AttributeError: 'SlackTeam' object has no attribute 'hashed_messages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// DiscoStrobe | |
// *Flashing* rainbow lights that zoom back and forth to a beat. | |
// See your doctor before using this code if you have certain neurological conditions. | |
// | |
// Mark Kriegsman, July 2015 | |
#if FASTLED_VERSION < 3001000 |
NewerOlder