Skip to content

Instantly share code, notes, and snippets.

@lukasmrtvy
lukasmrtvy / gist:dfd215f57995723096bce2e4222a2fe6
Created March 30, 2018 11:21 — forked from nmattam/gist:bcfbc8a4ebd9a520c2ac50ab0137e58f
[Splunk] Automate "Apply Changes" for Monitoring Console
# Create DMC groups
# This is basically updating the system/local/distsearch.conf
# I got all the IPs used below from /servicesNS/admin/-/search/distributed/peers. I used DNS names for search head (I had only one SH) and cluster master. So it was easy to separate the indexer IPs.
# 8089 is my API PORT
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_search_head -d member=<search_head_member1:8089> -d member=<search_head_member2:8089> -d default=false
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_cluster_master -d member=<cluster_master:8089> -d default=false
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_indexer -d member=<indexer1:8089> -d member=<indexer2:8089> -d default=true # not idea why default=true for indexers
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_indexerclustergroup_<CLUSTER_L
@lukasmrtvy
lukasmrtvy / index.php
Created November 29, 2015 21:34 — forked from Skalman/index.php
Dynamic RSS feeds from Youtube links
<?php
if (!isset($_GET['url'])) {
?>
<!DOCTYPE html>
<meta charset="utf-8">
<title>Youtube RSS creator</title>
<form>
<p>Create an RSS feed for the videos on the following page:
<p><input name="url" placeholder="E.g. https://www.youtube.com/user/scishow/videos" style="width: 30em">
@lukasmrtvy
lukasmrtvy / ytwll2m3u.php
Created November 29, 2015 11:36 — forked from adlerweb/ytwll2m3u.php
Youtube WatchLater to Playlist Script
<?php
/**
* Youtube Watch Later List To Playlist Script
*
* This script fetches your watch later list and outputs it as an M3U playlist
*
* Requirements:
* PHP enabled webserver
* Google PHP API (https://github.com/google/google-api-php-client)
@lukasmrtvy
lukasmrtvy / start-stop-daemon-template
Last active August 29, 2015 14:27 — forked from bcap/start-stop-daemon-template
Template file for creating linux services out of executables using the start-stop-daemon
#!/bin/bash
### BEGIN INIT INFO
# Provides: <service name>
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <service description>
### END INIT INFO