With bash
git clone "<your-project-url>"
$ git clone "<your-project-url>"
Cloning into "'<your-project>'"...With console
| // This gist provides an example of doing highlighting for | |
| // Alveo annotations within a document displayed in a <pre> tag. | |
| // It can be used at display time in the browser (with the right API calls). | |
| // Although jQuery is used, it's not required except for the page update at the end | |
| // Insert method for strings | |
| String.prototype.insert = function (index, string) { | |
| if (index > 0) { | |
| if (index > this.length) { |
With bash
git clone "<your-project-url>"
$ git clone "<your-project-url>"
Cloning into "'<your-project>'"...With console
| # start your script with | |
| #!/bin/bash -eu | |
| # Or | |
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset |
| const decrypt = data => | |
| new Promise((resolve, reject) => | |
| kms.decrypt( | |
| { | |
| CiphertextBlob: Buffer.from(data, 'base64') | |
| }, | |
| (err, data) => { | |
| if (err) { | |
| reject(err); | |
| } else { |
| #!/bin/bash -eu | |
| # This script prints out git metadata information for a given commit (or head by default) | |
| # It assumes tags of the form `v1.2.3`, and will print prerelease versions when | |
| # not on an exact tag. | |
| # | |
| # It is intended to be used like so: | |
| # | |
| # cd <some-git-repo> | |
| # $(../semver-from-git.sh) |
| #!/bin/bash -eu | |
| if [ -z "${LIB_ROBUST_BASH_SH:-}" ]; then | |
| LIB_ROBUST_BASH_SH=included | |
| function error { | |
| echo "Error: ${1:-}" | |
| } | |
| # Check to see that we have a required binary on the path | |
| function require_binary { |
(Thanks to Andras Bubics and Matt Fellows for many discussions leading to this proposal)
Test frameworks for Javascript are diverse - some run in parallel by default, some have different testing styles or expectations (eg BDD), and they all have different ways to configure and instrument the test framework.
The Pact workflow also includes a number of (necessary) assumptions and expectations - such as the need to keep
| const AWS = require('aws-sdk'); | |
| const encryptedEnvironmentVariableNames = ['SOME_VARIABLE', 'SOME_OTHER_VARIABLE']; | |
| // This module exports a function that returns a promise for obtaining | |
| // a decrypted copy of the environnment. | |
| // | |
| // Configure it by putting the name of each environment variable you would like to | |
| // decrypt above. | |
| // |
Here's a list of things I find useful to check off when writing handover documentation for source code.
These get checked at the end, but they're at the front of the document because they're good to keep in mind the whole time