Skip to content

Instantly share code, notes, and snippets.

@oxo42
oxo42 / ikea_open_close_remote.yaml
Created September 21, 2022 16:50 — forked from r3mcos3/ikea_open_close_remote.yaml
Home Assistant Blueprint For ZHA IKEA Open/Close Remote
blueprint:
name: IKEA Open/Close Remote
description: |
'Control your roller blind with an IKEA 2 button remote (the square ones).
this is the remote that's been delivered by the "Fytur" and " Kadrilj"
roller blinds.'
domain: automation
input:
remote:
name: Remote
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 June 30, 2016 10:40
Migrate Splunk users from LDAP to SSO
#!/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 January 22, 2016 14:52
Nginx proxy to Splunk web and HTTP event collector
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 18:18
Splunk My Garmin - Part 1 - Props.conf
[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 December 29, 2015 12:48
Download multiple Digital Blasphemy Photos
$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)
{