Skip to content

Instantly share code, notes, and snippets.

💭
Busy

Unmesh Gundecha upgundecha

💭
Busy
View GitHub Profile
@upgundecha
upgundecha / README.MD
Created Oct 22, 2019
QR Code and Url Scheme
View README.MD

This requires Python installed on the machine

  1. Install Python QR code package along with Pillow
pip install qrcode[pil]
  1. Generate a QR code with Url Scheme (in this example, we'll create a QR code which opens given URL in Google Chrome browser
@upgundecha
upgundecha / step.md
Last active Mar 3, 2018
Recording terminal session videos with asciinema.org on Mac
View step.md
  1. Install
brew install asciinema
  1. Start recording with
asciinema rec
  1. Stop recording with
@upgundecha
upgundecha / index.js
Created Jan 21, 2018
Simple BMI Calculator Lambda function
View index.js
'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;
@upgundecha
upgundecha / KendoDropdownTest.java
Last active Jul 4, 2017
Selenium WebDriver + Java - Kendo Dropdown Example (requires Java 8)
View KendoDropdownTest.java
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;
@upgundecha
upgundecha / ifttt_jenkins.py
Created Jun 25, 2017
"If This Then That" Jenkins example
View ifttt_jenkins.py
#!/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
#
View AWS CodeBuild Spec for Postman Collection
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
@upgundecha
upgundecha / 0_reuse_code.js
Created Mar 13, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@upgundecha
upgundecha / SampleTest.java
Last active Aug 14, 2019
Selenium test for SAP Fiori UI
View SampleTest.java
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;
View cucumberConf.js
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.
@upgundecha
upgundecha / hooks.js
Created Feb 19, 2017
cucumber-js hooks
View hooks.js
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()) {
You can’t perform that action at this time.