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 / ubuntu_desktop_xrdp.md
Created February 26, 2025 17:41
xRDP (Remote Desktop) on Ubuntu 24.04 LTS

How To Enable Remote Desktop Protocol (RDP) Using xrdp on Ubuntu 24.04

Setup

Step 1: Install xfce4 (Light Desktop Environment) on Ubuntu

Tip: You should be able to run both Qt (KDE) and GtK (Gnome) based apps.

@mayurah
mayurah / cpu_steals.md
Created February 25, 2025 12:35
Track any shared CPU amongst neighbors (useful to detect oversold CPU VMs on Cloud providers)

Great! Let’s set up the monitoring and logging step by step. I’ll guide you through the process.

Step 1: Install Necessary Tools

We need to install mpstat (from the sysstat package) for monitoring CPU steal time and vnstat for bandwidth monitoring.

  1. Install sysstat for mpstat: Run the following command based on your Linux distribution:

    For Ubuntu/Debian:

@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):