What is Mocha? Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser.
What is Tape? Tape is a tap-producing test harness for node and browsers
| Feature | Tape | Mocha |
|---|
| // Remove all drafts from your drafts view | |
| // Navigate to drafts | |
| // F12 to raise dev console | |
| // Paste the below | |
| (async function(x) { | |
| for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) { | |
| e.click(); | |
| await new Promise(resolve => setTimeout(resolve, 500)) | |
| document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click(); | |
| await new Promise(resolve => setTimeout(resolve, 1500)) |
| FROM alpine:latest | |
| RUN apk add --no-cache postfix postfix-pcre rsyslog | |
| RUN postconf -e "myhostname=localhost" \ | |
| && postconf -e "mynetworks_style=host" \ | |
| && postconf -e "mail_spool_directory=/var/mail/" \ | |
| && postconf -e "virtual_alias_maps=pcre:/etc/postfix/virtual" \ | |
| && echo "/.*/ root" > /etc/postfix/virtual \ | |
| && postmap /etc/postfix/virtual \ |
| // [START initialize_firebase_in_sw] | |
| // Give the service worker access to Firebase Messaging. | |
| // Note that you can only use Firebase Messaging here, other Firebase libraries | |
| // are not available in the service worker. | |
| importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js'); | |
| importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js'); | |
| // Initialize the Firebase app in the service worker by passing in the | |
| // messagingSenderId. | |
| firebase.initializeApp({ |
xhost + ${hostname} to allow connections to the macOS host *export HOSTNAME=`hostname`* environment:
Step zero: Install this role by creating the directories roles/letsencrypt/, roles/letsencrypt/files/ and roles/letsencrypt/tasks/. Then save the tasks.yml from this gist as roles/letsencrypt/tasks/main.yml and config.sh from this gist as roles/letsencrypt/files/config.sh.
Step one: Add the following to your nginx server config
location /.well-known/acme-challenge {
root /var/www/letsencrypt;
}
Step two: Execute the ansible role, e.g. using
| {# style 1 - long form #} | |
| {% if filepath == '/var/opt/tomcat_1' %} | |
| {% set tomcat_value = tomcat_1_value %} | |
| {% else %} | |
| {% set tomcat_value = tomcat_2_value %} | |
| {% endif %} | |
| {# style 2 - short form #} | |
| {% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
| To use: create a new bookmark and paste into the URL field. | |
| In Chrome, you can paste the full multiline code as shown below. | |
| In other browsers, you may need to minify the code into one line first. |
| #!/usr/bin/env bash | |
| ######################################################################## | |
| # Author: Joseph Nix [email protected] 6-18-2015 | |
| # Copyright (c) 2015 Terminal Labs | |
| # Distributed under the MIT License. | |
| # (See http://opensource.org/licenses/MIT) | |
| # | |
| # This tests the average page load time for a given url. It can be set | |
| # to run any number of tests, and then will average the results. | |
| # |