This requires Python installed on the machine
- Install Python QR code package along with Pillow
pip install qrcode[pil]
- Generate a QR code with Url Scheme (in this example, we'll create a QR code which opens given URL in Google Chrome browser
This requires Python installed on the machine
pip install qrcode[pil]
brew install asciinema
asciinema rec
'use strict'; | |
exports.handler = function(event, context, callback){ | |
var height = event.height; | |
var weight = event.weight; | |
var bmi = weight/(height * height) * 10000; | |
bmi = Math.round ( bmi * 100 ) / 100; |
import org.junit.After; | |
import org.junit.Assert; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.internal.WrapsDriver; |
#!/usr/bin/env python3 | |
# Copyright (c) 2016 Anki, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License in the file LICENSE.txt or at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- npm install newman --global | |
build: | |
commands: | |
- newman run -r html,cli sample_service.postman_collection --reporter-html-export report.html |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
package com.sapfioritrial.test; | |
import org.junit.After; | |
import org.junit.Assert; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.support.ui.ExpectedConditions; |
var env = require('./environment.js'); | |
// A small suite to make sure the cucumber framework works. | |
exports.config = { | |
seleniumAddress: env.seleniumAddress, | |
framework: 'custom', | |
frameworkPath: '../index.js', | |
// Spec patterns are relative to this directory. |
var startTime; | |
module.exports = function() { | |
this.After(function (scenario, callback) { | |
console.log("Name >> " + scenario.getName()); | |
console.log("Start Time >> " + startTime) | |
console.log("End Time >> " + new Date().getTime()) | |
if(scenario.isSuccessful()) { | |
console.log("PASS"); | |
} else if (scenario.isFailed()) { |