Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Door + Motion Light Timer (40s / 20m after 2 motions / 1h manual, toggle by switch)
description: >
- Door open -> light on + 40s (motion refreshes).
- Door closed -> count motions; after N motions -> 20m (motion refreshes).
- Manual switch ANY change -> toggle light:
if light becomes ON -> manual mode 1h (motion refreshes)
if light becomes OFF -> reset + cancel timer
- Timer finished -> light off + reset.
domain: automation
@NOX73
NOX73 / main.sh
Last active August 15, 2019 08:23
Remove remote merged branches
git fetch -p origin
git branch -r --merged origin/develop | grep "feature" | sed -e 's|origin/||' | xargs git push --delete origin
git branch -r --sort=committerdate | head -40 | sed -e 's|origin/||'
@NOX73
NOX73 / build.groovy
Created September 17, 2018 19:29
Jenkins Groovy Build only last script
import hudson.model.*
def action = hudson.plugins.git.util.BuildData.class
def currentBuild = this.build
def buildname = currentBuild.getDisplayName()
def revision = currentBuild.getAction(action).lastBuiltRevision.sha1String
def jobname = 'taxdome-features'
def job = currentBuild.project
// def job = Hudson.instance.getJob(jobname)
@NOX73
NOX73 / manual.sh
Last active May 10, 2018 06:49
CoreOS OpenVPN Docker
docker run -d --volumes-from ovpn-data --restart always --name vpn -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn