Skip to content

Instantly share code, notes, and snippets.

View mayurah's full-sized avatar
🏔️
grooming next generation of leaders and problem solvers!

Mayur Pipaliya mayurah

🏔️
grooming next generation of leaders and problem solvers!
View GitHub Profile
@mayurah
mayurah / semantic-commit-messages.md
Created October 15, 2021 07:51 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mayurah
mayurah / python_splunk_hec_logging.py
Last active October 10, 2022 04:22
Python Snippet to log in File or Splunk HEC
import logging
import logging.handlers
import datetime
from os.path import expanduser
from splunk_hec_handler import SplunkHecHandler
def setup_logger(name, host=None, port=8088, token=None, verify=False):
@mayurah
mayurah / k8s.as
Last active May 30, 2023 04:38
k8s aliases for microk8s / hidden port
alias k='microk8s.kubectl -n sc4snmp '
alias kl='k logs -f '
alias kga='k get all'
alias kda='k describe all'
alias kd='k describe '
alias ka='ka -f '
k get pods -o wide --all-namespaces
@mayurah
mayurah / fun.as
Created April 7, 2021 04:58
[fun list] to dynamically create object names
#######
#######
_TV_SHOWS = ['fotc', 'btvs', 'NTNOCN', 'KITH', 'ST TOS', 'STV', 'GoT', 'HTGAWM', 'LOTR', 'AVP', 'TLG', 'ET', 'BTVS', 'CSI', 'TBBT', 'AGT', 'SGA', 'SGU', 'SG SG1', 'BSG', 'WLIIA', 'ILL', 'ANTM', 'TAAHM', 'SATC', 'WWE', '1000WTD', 'LnO', 'TFA', 'TPM', 'AOTC', 'TWD', 'LSSC', 'HIMYM', 'ROTS', 'AOTJ', 'DW', 'NCIS LA', 'TDS', 'TLS', 'SNL', 'BBT', 'HNIC', 'TLJ', 'ST DS9', 'ST', 'TMNT', 'ST TNG', 'OUAT', 'OITNB', 'TXF']
_SUPERHEROES = ['Aquaman', 'Ant-Man', 'Asterix', 'The Atom', 'The Avengers', 'Batgirl', 'Batman', 'Batwoman', 'Black Canary', 'Black Panther', 'Captain America', 'Captain Marvel', 'Catwoman', 'Conan the Barbarian', 'Daredevil', 'The Defenders', 'Doc Savage', 'Doctor Strange', 'Elektra', 'Fantastic Four', 'Ghost Rider', 'Green Arrow',
'Green Lantern', 'Guardians of the Galaxy', 'Hawkeye', 'Hellboy', 'Incredible Hulk', 'Iron Fist', 'Iron Man', 'Marvelman', 'Robin', 'The Rocketeer', 'The Shadow', 'Spider-Man', 'Sub-Mariner', 'Supergirl', 'Superman', 'Teenage Mutant Ninj
@mayurah
mayurah / open_source.md
Created March 2, 2021 11:53
Open Source Volunteering Opportunity #opensource
@mayurah
mayurah / dashboard.xml
Created October 2, 2020 19:03
[Splunk] Dashboard #dashboard #css #beautification
<row>
<html>
<style>
.dashboard-element-title{
text-align: center;
background: #00506f;
font-family: Verdana;
}
@mayurah
mayurah / js-skill
Created August 6, 2020 13:16
requirements for assessment of a JS developer skills
# Summary
This repo documents requirements for assessing JS development skills
# Project description
Create a [React](https://reactjs.org/) component that is capable of taking as input a list of files with absolute paths and gives users the ability to explore that list of files hierarchically (tree) - similar to a file explorer. In addition to the `path`, each file will have a list of properties (e.g. size, create time, mod time, owner etc...) which need to be rendered when the files are presented.
# Example input
```
const files = [
@mayurah
mayurah / azure_blob_storage.js
Created June 29, 2020 23:47
azure_blob_storage.js
!function(t){var e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):((e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).AzureStorage||(e.AzureStorage={})).Blob=t()}(function(){return function o(a,s,l){function c(e,t){if(!s[e]){if(!a[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[e]={exports:{}};a[e][0].call(r.exports,function(t){return c(a[e][1][t]||t)},r,r.exports,o,a,s,l)}return s[e].exports}for(var u="function"==typeof require&&require,t=0;t<l.length;t++)c(l[t]);return c}({1:[function(t,e,n){e.exports.generateDevelopmentStorageCredentials=function(t){var e="UseDevelopmentStorage=true;";return t&&(e+="DevelopmentStorageProxyUri="+t),e};var i=t("../lib/services/blob/blobservice.browser");e.exports.BlobService=i,e.exports.BlobUtilities=t("../lib/service
@mayurah
mayurah / aws_lambda_market.as
Created June 29, 2020 22:48
[aws lambda marketplace] #productivity #marketplace #lambda #serverless #function #faas
Marketplace for Functions: https://console.aws.amazon.com/lambda/home#/create/function?tab=serverlessApps
--- RAW notes on Splunk + AWS ---
Webhook for Splunk on AWS:
https://us-east-2.console.aws.amazon.com/lambda/home?region=us-east-2#/create/app?applicationId=arn:aws:serverlessrepo:us-west-2:655989818655:applications/Webhook-to-Splunk-HTTP-Event-Collector
https://1h6at9967c.execute-api.us-east-2.amazonaws.com/Prod
https://1h6at9967c.execute-api.us-east-2.amazonaws.com/Prod/webhook-to-hec?url=<your.server.com>&port=8088&http_method=https&token=<223342-23242-232324>