Skip to content

Instantly share code, notes, and snippets.

View .minttyrc
Term=xterm-256color
BoldAsFont=yes
Font=DejaVu Sans Mono for Powerline
FontHeight=8
Transparency=medium
OpaqueWhenFocused=yes
CursorType=block
CursorBlinks=no
RightClickAction=paste
Scrollbar=none
@oxo42
oxo42 / migrate-to-sso.sh
Created Jun 30, 2016
Migrate Splunk users from LDAP to SSO
View migrate-to-sso.sh
#!/bin/bash
splunk_home=/opt/splunk/etc
my_users=$splunk_home/apps/my_domain/lookups/my_users.csv
users=$splunk_home/users
authfile=$splunk_home/new-auths.txt
# Clear the auth file
: > $authfile
@oxo42
oxo42 / Nginx-Proxy.conf
Created Jan 22, 2016
Nginx proxy to Splunk web and HTTP event collector
View Nginx-Proxy.conf
server {
listen *:80;
server_name splunk-web.example.com;
if ($ssl_protocol = "") {
return 301 https://$host$request_uri;
}
index index.html index.htm index.php;
access_log /var/log/nginx/splunk-web.example.com.access.log combined;
@oxo42
oxo42 / gist:34d2d755027b109b986a
Created May 18, 2015
Splunk My Garmin - Part 1 - Props.conf
View gist:34d2d755027b109b986a
[tcx]
BREAK_ONLY_BEFORE = \<\?xml version
MAX_EVENTS = 999999999
NO_BINARY_CHECK = true
TIME_PREFIX = \<Id\>
category = Structured
description = Garmin Training Center Database XML File
disabled = false
pulldown_type = true
KV_MODE = xml
@oxo42
oxo42 / gist:7672630
Last active Dec 29, 2015
Download multiple Digital Blasphemy Photos
View gist:7672630
$resolutions = @{"640x960" = "640x960"; "640x1136" = "640x1136"; "960x544" = "960x544"; "1024x1024" = "1024x1024"; "2048x2048" = "2048x2048"; "1080x1920" = "1080x1920"; "1920x1080" = "1080p" }
$user = $args[0]
$password = $args[1]
$url = $args[2]
$ismatch = $url -match 'i=(.+)$'
if(!$ismatch)
{