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
/** | |
* Run a series of async/promisifed functions sequentially, | |
* returning an array of results. | |
* Throws any exceptions. | |
* | |
* example: | |
* const values = [1, 2, 3, 4, 5]; | |
* const callback = async (value) => await someAsyncThing(value) | |
* const result = await sequentialAsync(values, callback); | |
* |
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
/** | |
* Run a series of async/promisifed functions sequentially, | |
* returning an array of results and errors. | |
* | |
* example: | |
* const values = [1, 2, 3, 4, 5]; | |
* const callback = async (value) => await someAsyncThing(value) | |
* const result = await sequentialAsync(values, callback); | |
* | |
* @param {Iterable} values |
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
#!/bin/bash | |
set -e | |
# backup.sh | |
# makes a copy of a file, appending a datestamp and incrementing a counter | |
# if it's needed. | |
# | |
# ie, running this 3 times: | |
# backup.sh /foo/bar.qux /foo/backups | |
# will create: |
I hereby claim:
- I am markreid on github.
- I am markreid (https://keybase.io/markreid) on keybase.
- I have a public key ASCycZr-FHQl-mr28t-vaQdxjlg9ZZmkZIe9hIEjdIXHiAo
To claim this, I am signing this object:
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
// https://stackoverflow.com/questions/17221573/is-it-possible-to-view-all-active-subscriptions | |
var subs = Meteor.default_connection._subscriptions; //all the subscriptions that have been subscribed. |
Most of these questions have several possible answers and no real wrong answer. The aim of the quiz is to gauge your level of experience with software development in general but also your experience working directly in Javascript, so add as much detail as possible, explain how you arrived at your answer, etc.
Some of the questions are quite difficult or confusing, so don't worry too much if you're not sure about the answers; a couple of them are deliberately designed to be hard to solve!
- Describe the stack for a recent project that you found interesting.
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
#!/usr/bin/perl | |
# Author: Todd Larason <[email protected]> | |
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
# use the resources for colors 0-15 - usually more-or-less a | |
# reproduction of the standard ANSI colors, but possibly more | |
# pleasing shades | |
# colors 16-231 are a 6x6x6 color cube | |
for ($red = 0; $red < 6; $red++) { |
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
" Name: Solarized vim colorscheme | |
" Author: Ethan Schoonover <[email protected]> | |
" URL: http://ethanschoonover.com/solarized | |
" (see this url for latest release & screenshots) | |
" License: OSI approved MIT license (see end of this file) | |
" Created: In the middle of the night | |
" Modified: 2011 May 05 | |
" | |
" Usage "{{{ | |
" |
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
var hasRun = false; | |
var job; | |
runs(function(){ | |
addJob(function(returnedJob){ | |
// this is some asynchronous thing | |
job = returnedJob; | |
hasRun = true; | |
}) |
NewerOlder