Skip to content

Instantly share code, notes, and snippets.

View mayurah's full-sized avatar
🧋
grooming next generation of problem solvers!

Mayur Pipaliya mayurah

🧋
grooming next generation of problem solvers!
View GitHub Profile
@mayurah
mayurah / tmp
Created March 13, 2024 12:47
tmp
# Create a folder
$ mkdir actions-runner && cd actions-runner# Download the latest runner package
$ curl -o actions-runner-linux-x64-2.314.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.314.1/actions-runner-linux-x64-2.314.1.tar.gz# Optional: Validate the hash
$ echo "6c726a118bbe02cd32e222f890e1e476567bf299353a96886ba75b423c1137b5 actions-runner-linux-x64-2.314.1.tar.gz" | shasum -a 256 -c# Extract the installer
$ tar xzf ./actions-runner-linux-x64-2.314.1.tar.gz
# Create the runner and start the configuration experience
$ ./config.sh --url https://github.com/splunk/splunk-3D-graph-network-topology-viz --token AGGDLRGPIDMG32CDWTUHTNDF6GWFG# Last step, run it!
$ ./run.sh
@mayurah
mayurah / download-zoom-recording.md
Created February 28, 2024 11:06 — forked from atomkirk/download-zoom-recording.md
Force download a zoom recording
  1. Open dev tools
  2. Search for the <video… tag.
  3. Copy the source URL
  4. Right click on the body tag and click Edit as HTML
  5. Add an a link with the src right inside the body tag like:
<body>
  <a href="url-you-copied">download</a>
  ...
@mayurah
mayurah / xkcd.xml
Created June 26, 2023 16:26
Splunk XKCD
<form version="1.1">
<label>XKCD API Explorer</label>
<description>XKCD Dashboard to explore Comic data</description>
<fieldset submitButton="false">
<input type="dropdown" token="img">
<label>XKCD Comic</label>
<fieldForLabel>safe_title</fieldForLabel>
<fieldForValue>img</fieldForValue>
<search>
<query>index=main img=* | dedup img | table safe_title img month num alt year | sort - safe_title</query>
<nav search_view="search" color="#000000">
<collection label="CMMC">
<view name="cmmc_home"/>
<view name="cmmc_contents"/>
<divider />
<collection label="Access Control - AC">
<view name="AC_1_001_cmmc"/>
<view name="AC_2_005_cmmc"/>
<view name="AC_2_006_cmmc"/>
<view name="AC_1_002_cmmc"/>
@mayurah
mayurah / Search my gists.md
Created June 16, 2023 03:06 — forked from OrenBochman/Search my gists.md
How to search gists

Gist Search Cheatsheet

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:orenbochman

Find all gists with a .yml extension.
extension:yml

@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