Skip to content

Instantly share code, notes, and snippets.

@kkashyap1707
kkashyap1707 / .gitlab-ci.yml
Created Mar 3, 2021 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
View .gitlab-ci.yml
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@kkashyap1707
kkashyap1707 / Curl job run.md
Created Jan 13, 2021 — forked from gschueler/Curl job run.md
How to run a rundeck job using curl
View Curl job run.md

Run a Job using Curl

This document describes how to use CURL to interact with the RunDeck server to invoke a Job to run.

The steps are as follows:

  1. Authenticate to the RunDeck server and acquire a session cookie.
  2. Submit run request for particular Job ID, sending session cookie.
@kkashyap1707
kkashyap1707 / deploy.sh
Created Aug 22, 2020 — forked from polaskj/deploy.sh
Lambda function that takes ECS Cloudwatch events and sends a notification to Slack
View deploy.sh
#!/bin/bash
# deploy serverless stack
serverless deploy \
--stage "dev" \
--region "us-east-1" \
--service-name "my-service-name" \
--slack-channel "#slack-alerts-example" \
--webhook-url "https://hooks.slack.com/services/12345/12345/abcdefg" \
--ecs-cluster-arn "arn:aws:ecs:us-east-1:123456:cluster/test-cluster"
@kkashyap1707
kkashyap1707 / setDatasource.py
Created Jun 3, 2020 — forked from al4/setDatasource.py
Set the datasource on grafana dashboards
View setDatasource.py
#!/usr/bin/env python
import sqlite3
import json
"""
Quick quick script to set the datasource for grafana dashboards
"""
OLD_DATASOURCE = 'null'
@kkashyap1707
kkashyap1707 / grafana-dashboard-exporter
Created May 14, 2020 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
View grafana-dashboard-exporter
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done
@kkashyap1707
kkashyap1707 / code.md
Created Jan 15, 2020 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code
View code.md

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

View iOS Real Device Desired Capabilities
public static void main(String[] args)
{
IOSDriver driver = null;
try
{
final DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TTND iPhone6 Plus"); //Here you have to provide exact Device Name
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformName", "iOS");
View iOS Real Device Program
public static void main(String[] args)
{
IOSDriver driver = null;
try
{
final DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TTND iPhone6 Plus");
capabilities.setCapability("browserName", "");
View ExtentConfig
<?xml version="1.0" encoding="UTF-8"?>
<extentreports>
<configuration>
<!-- document encoding -->
<!-- defaults to UTF-8 -->
<encoding>UTF-8</encoding>
<!-- protocol for script and stylesheets -->
<!-- defaults to https -->
<protocol>https</protocol>