This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
#!/usr/bin/env python | |
# Usage | |
# ./gen_dkim.py mail.yourdomain.tld | |
import sys | |
from subprocess import call | |
from os import devnull | |
if len(sys.argv) < 2: |
'use strict'; | |
import ExampleObject from './../objects/ExampleObject'; | |
const schema = { | |
"properties": { | |
"primaryID": { | |
"type": "string", | |
"format": "uuid" | |
} |
The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.
Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.
This repo also contains a bundled version of npm that has a new command, asset
. You can read the documentation for and goals of that comma
#!/usr/bin/env bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
profile=$1 | |
[ -z "$profile" ] && printf "\nERROR: missing profile name.\n\nUsage:\n\n '$0 <profileName>'\n" && exit 1 | |
[ ! -f "$DIR/.npmrc-profiles/$profile" ] && printf "\nERROR: profile '$profile' not found\n" && exit 1 | |
cd $DIR && ln -sf .npmrc-profiles/$profile .npmrc |
This sets up a publically-available domain that loops back to localhost IP address 127.0.0.1
. For example, this address could be localhost.example.com
if we controlled the example.com
domain. This relies on having a public domain name whose DNS records you can control. We can then generate LetsEncrypt certificates for this domain.
Our HTTP server runs on localhost:80
(default HTTP port). This lets us visit http://localhost.example.com
in a web browser and see the server running on localhost:80
.
We then run an HTTPS proxy server on localhost:443
(default HTTPS port) that uses the LetsEncrypt certificates we generated for localhost.example.com
. Visiting https://localhost.example.com
hits the proxy, which returns the correct certificates meaning the browser displays the "Secure" message. The proxy then passes the request through to the HTTP server.
- name: DO | |
hosts: localhost | |
vars: | |
project_name: "PUT A NAME FOR YOUR PROJECT HERE" | |
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens" | |
repository: "PUT YOUR REPOSITORY URL HERE" | |
tasks: | |
- name: LOCAL | Generate SSH key | |
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N "" |
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
- TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
- In the wild, we're seeing
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems - Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.
I'll leave the rest of this document unedited, for archaeological
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of