I hereby claim:
- I am theefer on github.
- I am theefer (https://keybase.io/theefer) on keybase.
- I have a public key ASDhvIdbKDHAA91vnw3d0ghMvxTndeVN3B1aM5Zy_tqNtgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Given: | |
// getFullName(id) => Promise<String> | |
// getAvatarId(id) => Promise<int> | |
// getImageById(id) => Promise<String> | |
// ## Using promises without unnecessary nesting makes it more obvious what | |
// ## request depend on what other requests (they require async data) and | |
// ## everything is parallelised by default. | |
// (Good - parallel) Promises |
Besides the valid concerns @Rich_Harris has raised, another thing to worry about is the way await
makes it very easy to cause asynchronous work to be scheduled sequentially when it could be parallelised (and hence faster).
Consider the following:
import {getDayOfWeek} from './static-dep';
const dish = getDayOfWeek() === 'friday' ? 'fish' : 'chicken';
@JS('darttest') | |
library darttest; | |
import 'package:js/js.dart'; | |
@JS() | |
external FooBar getFooBar(); | |
@JS() | |
class FooBar { |
(function(win) { | |
function FooBar() { }; | |
function Node() { }; | |
win.darttest = { | |
FooBar: FooBar, | |
Node: Node, | |
getFooBar: function() { | |
return new FooBar(); | |
}, |
#!/usr/bin/env node | |
var validate = require('sourcemap-validator'), | |
fs = require('fs'), | |
assert = require('assert'); | |
var compiledSource = process.argv[2]; | |
if (! compiledSource) { | |
console.log("usage: validate.js <compiled-source.js>"); | |
process.exit(1); |
#!/bin/bash | |
# | |
# Open a URL in Chrome after SSH'ing to the URL's host and setting up a SOCKS proxy. | |
if [ $# -ne 1 ] | |
then | |
echo "usage: browse-with-proxy.sh <URL>" | |
echo | |
echo "Opens the given URL in a browser using an SSH tunnel to the host as a proxy" | |
echo |
var glob = require('../luigi/src/operation/glob'); | |
var bower = require('../luigi/src/operation/bower'); | |
var uglify = require('../luigi/src/operation/uglify')(); | |
var concat = require('../luigi/src/operation/concat')(); | |
var requirejs = require('../luigi/src/operation/requirejs'); | |
var hash = require('../luigi/src/operation/hash')(); | |
var rename = require('../luigi/src/operation/rename'); | |
var less = require('../luigi/src/operation/less'); | |
var lodash = require('../luigi/src/operation/lodash'); | |
var write = require('../luigi/src/operation/write'); |
<input type="text" placeholder="Your Google Music account" size="30" | |
id="gmusic-switcher-account" | |
onkeyup=" | |
(function() { | |
var account = document.getElementById('gmusic-switcher-account').value; | |
var bookmarklet = document.getElementById('gmusic-switcher-bookmarklet'); | |
var hrefTemplate = bookmarklet.getAttribute('data-href'); | |
var email; | |
if (validEmail(account)) { |