Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View elneruda's full-sized avatar

Paul Nicolas elneruda

View GitHub Profile
@elneruda
elneruda / searchAllWantedMovies.sh
Last active June 23, 2023 01:20
search wanted on radarr / sonarr
#!/bin/sh
RADARR_API_URL="http://radarr.com/api"
RADARR_API_KEY="PUT_YOUR_API_KEY_HERE"
history=$(curl -s ${RADARR_API_URL}/history?page=1\&pageSize=20\&sortKey=date\&sortDir=desc -H "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" -X GET -H 'X-Api-Key: '$RADARR_API_KEY'' -k)
history=$(echo $history | tr -d '\n' | tr -d '\r' | tr -d '\b')
grabbed=$(echo $history | jq '.records | .[] | select(.movie.monitored) | select(.movie.downloaded | not) | select(.eventType=="grabbed") | .movieId')
grabbed=$(echo $grabbed | sed 's/ /, /g')
grabbed="[${grabbed}]"
@elneruda
elneruda / Radarr Slack Custom Script.sh
Last active June 23, 2023 01:19
Radarr Sonarr Slack Custom Script : Rich slack notifications, episode & movie link
#!/bin/bash
SLACK_URL=$1
RADARR_API_URL="$2/api"
RADARR_API_KEY=$3
post_to_slack() {
curl --silent -X POST --data "payload={\"text\": \"${1}\", \"unfurl_links\": true, \"mrkdwn\": true}" ${SLACK_URL}
}
@elneruda
elneruda / hueHelper.sh
Created February 8, 2017 14:12
plexpy -> iFTTT Maker -> hue
#!/bin/sh
HOOK_IFTTT_MAKER_KEY=""
HOOK_PLEX_USERNAME=""
HOOK_PLEX_PLAYER=""
HOOK_PLEX_NIGHT_HOUR_MIN=19
HOOK_PLEX_NIGHT_HOUR_MAX=6
HOOK_PLEX_PLAY="Play"
HOOK_PLEX_STOP="Stop"
;End GCode
;Ultimaker 2+ octoprint
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F4200 ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning
;Generated with Cura_SteamEngine 15.04
;Ultimaker 2+ octoprint
M140 S60.0
M109 T0 S210.0
T0
M190 S60.0
;Sliced at: Thu 15-12-2016 09:28:45
;Basic settings: Layer height: 0.1 Walls: 1.2 Fill: 80
;Print time: ?print_time?
;Filament used: ?filament_amount?m ?filament_weight?g