Skip to content

Instantly share code, notes, and snippets.

Sample salt commands to be run from a salt master. These commands have been tested with salt 2017.7.4 (Nitrogen).
# install a tool in all minions connected to a salt master.
sudo salt '*' cmd.run 'sudo apt-get install nmon -y'
# run a linux command in all minions connected to a salt master.
sudo salt '*' cmd.run 'date'
# check if a system reboot is required in all minions connected to a salt master.
sudo salt '*' system.get_reboot_required_witnessed
@rajanm
rajanm / bulk_file_rename.bat
Last active August 22, 2019 15:35
DOS batch file utility to rename files in bulk.
@echo off
rem Name: Bulk File Rename
rem DOS batch file utility to rename files in bulk.
setlocal enableDelayedExpansion
set /p "string1=Enter the character sequence to be replaced in the filename: "
set /p "string2=Enter the new character sequence in the filename: "
@rajanm
rajanm / !Elasticsearch Samples.md
Last active September 20, 2020 23:55
Elasticsearch Sample Scripts

This gist contains various example scripts for Elasticsearch. These scripts have been tested with Elasticsearch Server v1.5.2. These scripts can be run from shell/terminal in a Unix or from git bash in a Windows.

For a full fledged Java sample project, refer - ElasticsearchJavaSample