Skip to content

Instantly share code, notes, and snippets.

View ashwanth1109's full-sized avatar
💭
Do or do not, there is no try . . .

Ashwanth A R ashwanth1109

💭
Do or do not, there is no try . . .
View GitHub Profile
process.env.AWS_SDK_LOAD_CONFIG = "true";
process.env.AWS_PROFILE = "volt";
import * as AWS from "aws-sdk";
var credentials = new AWS.SharedIniFileCredentials({ profile: "volt" });
AWS.config.credentials = credentials;
const connect = new AWS.Connect();
@ashwanth1109
ashwanth1109 / index.html
Last active January 20, 2021 08:44
Minimal HTML template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<title>Minimal HTML</title>
</head>
<body>
@ashwanth1109
ashwanth1109 / Dockerfile
Last active February 15, 2021 10:58
AWS Lambda Dockerfile
FROM amazon/aws-lambda-nodejs:12
COPY src/ package*.json ./
RUN npm install
CMD [ "index.handler" ]
@ashwanth1109
ashwanth1109 / feedback.md
Last active April 13, 2021 09:22
Summary from hackathon feedback

Feedback notes

Note: Number at the end indicates the number of people raising the same issue
  • Need SAVE, VALIDATE and PUBLISH
  • Validate the iterator
  • Parameters in TEST are not persisted across flows * 2
  • Execution Traces was failing to open 50% of the time (so was only able to debug using kibana logs)
[
{
"id": 3070,
"type": "NO_OP",
"reference_id": "No-Op",
"reference_version": "No-Op",
"reference_domain": "No-Op",
"input_schema": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema\",\n \"$id\": \"http://example.com/root.json\",\n \"type\": \"object\",\n \"examples\": [\n {\n \"FlowID\": \"1440\",\n \"TraceId\": \"1-60d378ab-f58a4bc90ed41dfc5cf83fbf\",\n \"NodeName\": \"node-tokenize\",\n \"Time\": \"2021-06-23 18:08:51.157115\",\n \"Reason\": \"reason\",\n \"Details\": \"details\",\n \"StatusCode\": 500,\n \"NodeInput\": \"input\",\n \"NodeOutput\": \"output\"\n }\n ],\n \"properties\": {\n \"FlowID\": {\n \"$id\": \"#/properties/flowID\",\n \"type\": \"string\",\n \"title\": \"FlowID\",\n \"description\": \"Input is stored under event\",\n \"examples\": [\"1440\"]\n },\n
@ashwanth1109
ashwanth1109 / schemas.js
Created September 8, 2022 07:18
Message Filters
const schema = {
type: "object",
properties: {
type: "array",
items: {
type: "object",
properties: {
typeOfRow: {
type: "string",
},
@ashwanth1109
ashwanth1109 / useApi.ts
Created September 16, 2022 02:53
useAPI proposal
import { useState, useEffect, useCallback } from 'react';
import axios, { AxiosInstance } from 'axios';
import camelcaseKeys from 'camelcase-keys';
import { ok, err, Result } from 'neverthrow';
interface APIError {
message: string;
}
interface useApiProps {
name: high_cpu
title: High CPU Advisory
triageGraph:
context:
name: cpu_utilization
label: CPU Utilization
description: There is significant increase in the CPU
indicators:
- name: CPU over time
name: high_cpu
parameters:
accountId: 6
accountName: GFI-Dev
applianceId: 78d81cf0-36a9-4661-a50c-50a28a377c64
applianceName: Archiver DeployDev 75
title: High CPU Advisory
triageGraph:
context:
description: There is significant increase in the CPU
@ashwanth1109
ashwanth1109 / top-10-senders-ip-domain.json
Last active December 21, 2022 12:18 — forked from aashishgaba-cn/top-10-senders-ip-domain.json
Dumm top 10 senders ip domain
[
{
"ip": "65.74.1.108",
"ip2": "65.74.1.108",
"ip3": "65.74.1.108",
"ip4": "65.74.1.108",
"ip5": "65.74.1.108",
"ip6": "65.74.1.108",
"ip7": "65.74.1.108",
"ip8": "65.74.1.108",