Skip to content

Instantly share code, notes, and snippets.

@kabadisha
kabadisha / shinobi-disable-if-home.sh
Created February 13, 2021 18:54
Script to check if your phone is at home and disable Shinobi cameras. Runs as a cron job on an Asus router
#!/bin/sh
set -e
set -u
# Runs on your router to check if devices are connected via wifi.
# Disables motion detection on Shinobi network cameras if they are.
# Make sure local dns lookups are enabled on your router.
# On Asus Merlin routers this can be found under Tools > Other Settings >
# 'Wan: Use local caching DNS server as system resolver'
@kabadisha
kabadisha / zoneminder-check-if-home.sh
Created February 13, 2021 18:50
Script to check if your phone is at home and disable ZoneMinder cameras. Runs as a cron job on an Asus router
#!/bin/sh
set -e
set -u
# Runs on your router to check if devices are connected via wifi.
# Disables motion detection on ZoneMinder network cameras if they are.
# Make sure local dns lookups are enabled on your router.
# On Asus Merlin routers this can be found under Tools > Other Settings >
# 'Wan: Use local caching DNS server as system resolver'
@kabadisha
kabadisha / motioneye-check-if-home.sh
Last active December 29, 2020 11:09
Runs on your router to check if devices are connected via wifi. Disables any motioneye network cameras if they are.
#!/bin/sh
# Runs on your router to check if devices are connected via wifi.
# Disables motioneyeos network camera if they are.
# Make sure local dns lookups are enabled on your router.
# On Asus Merlin routers this can be found under Tools > Other Settings >
# 'Wan: Use local caching DNS server as system resolver'
# Requires enabling motioneyeos web control port:
@kabadisha
kabadisha / keybase.md
Created April 19, 2017 10:02
Keybase Proof

Keybase proof

I hereby claim:

  • I am kabadisha on github.
  • I am kabadisha (https://keybase.io/kabadisha) on keybase.
  • I have a public key ASATVhaYttm2OfwI1rVCcPm7YMz6zPh2aMS3GDQCx0Uf5Qo

To claim this, I am signing this object:

@kabadisha
kabadisha / dedup-imovie-library
Last active November 7, 2017 06:46 — forked from bhollis/dedup-imovie-library
When you import movies into iMovie 10 libraries, the file is always copied, wasting space and hindering editability. This script replaces the copy with a hardlink, reclaiming disk space.
#!/usr/bin/env ruby
# Usage: dedup-imovie-library LIBRARY ORIGINALS
#
# Goes through an iMovie 10 library and replaces all the "Original Media" with
# symlinks to the actual original media, in order to conserve disk space. Note
# that because they're symlinks, if the path to the originals changes (e.g. you
# rename the external drive they are on) then the links will be broken.
#
# This assumes you've already imported the files into iMovie and waited for them