Skip to content

Instantly share code, notes, and snippets.

View prashanth-sams's full-sized avatar
🍎
Each day is interesting!!!

Prashanth Sams prashanth-sams

🍎
Each day is interesting!!!
View GitHub Profile
@prashanth-sams
prashanth-sams / install.md
Last active December 4, 2019 18:13
Java Installation

Install Java 11

wget https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-linux-arm32-vfp-hflt.deb

sudo apt-get install ./bellsoft-jdk11.0.2-linux-arm32-vfp-hflt.deb

sudo update-alternatives --config javac
sudo update-alternatives --config java
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools
@prashanth-sams
prashanth-sams / sitespeed.io-deployment.yaml
Created November 17, 2019 14:05
Sitespeedio Deployment
kind: Deployment
apiVersion: apps/v1
metadata:
name: sitespeed-io
labels:
run: sitespeed-io
spec:
replicas: 1
selector:
matchLabels:
@prashanth-sams
prashanth-sams / blooper.py
Last active November 5, 2019 06:10
Python Automation - Appium parallel
if os.getenv('PYTEST_XDIST_WORKER') == 'gw1':
return 8101
else: # include 'master' and 'gw0'
return 8100
if os.getenv('PYTEST_XDIST_WORKER') == 'gw0':
return 'emulator-5554'
elif os.getenv('PYTEST_XDIST_WORKER') == 'gw1':
return 'emulator-5556'
else: # default
constructor(props){
super(props);
this.items = [
'David',
'Sara',
'Jane',
'Daniel',
'Debra'
];
this.state = {
@prashanth-sams
prashanth-sams / multiple.model.js
Last active September 5, 2019 07:28
Multiple model
"use strict";
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// Define collection and schema for Manager
var Manager = new Schema({
tag_name: [{
type: String
}],
book_name: {
@prashanth-sams
prashanth-sams / cucumber_vs_capybara.md
Last active September 4, 2019 13:14
cucumber vs capybara
|-------------------------------|-------------------------------|
|      Cucumber                 |     Capybara                  |
|-------------------------------|-------------------------------|
| Must be customized to support | Page-object-pattern support   |
| page-object-pattern           | using a 3rd party gem called  |
|                               | 'site-prism' which is on top  |
|                               | of Capybara                   |
|-------------------------------|-------------------------------|
| Test cases are more readable  | Test cases are not readable;  |
@prashanth-sams
prashanth-sams / manager.model.js
Last active September 5, 2019 07:28
Single model mongoose
"use strict";
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// Define collection and schema for Manager
let Manager = new Schema({
tag_name: [{
type: String
}],
book_name: {
@prashanth-sams
prashanth-sams / data-pv.yaml
Created September 2, 2019 09:12
Persistent Volume
---
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: data-pv
spec:
capacity:
storage: {{ .Values.capacity }}
accessModes:
- {{ .Values.accessMode }}
@prashanth-sams
prashanth-sams / jest-async.spec.js
Last active August 28, 2019 13:45
Jest Sample Test Suite
describe ('search component', () => {
it (`async test 1`, done=>{
setTimeout(done, 100);
});
it (`async test 2`, ()=>{
return new Promise(
resolve => setTimeout(resolve, 1500)
);