Skip to content

Instantly share code, notes, and snippets.

View demonbane's full-sized avatar

Alex Malinovich demonbane

View GitHub Profile
@demonbane
demonbane / gist:1f122f4d7f5fadba54e5a6a4fce4c8ff
Created June 20, 2020 04:26
homebridge-nest-cam@test install log
$ sudo npm -g i homebridge-nest-cam@test
/usr/bin/homebridge-nest-cam -> /usr/lib/node_modules/homebridge-nest-cam/cli.sh
> ffmpeg-for-homebridge@0.0.6 install /usr/lib/node_modules/homebridge-nest-cam/node_modules/ffmpeg-for-homebridge
> node install.js
Failed to download ffmpeg binary.
If you are installing this plugin as a global module (-g) make sure you add the --unsafe-perm flag to the install command.
The homebridge plugin has been installed, however you may need to install ffmpeg separately.
@demonbane
demonbane / clean-radarr-import.sh
Created February 5, 2019 07:59
Delete directory after Radarr import
#!/usr/bin/env bash
# log all output from here on out to a log file. Comment this line out if testing from command-line
exec >> /path/to/store/log-file
printf '\nclean-radarr-import.sh called at %b\n\n' "$(date)"
# For debugging, print every radarr environment variable passed to the script
# if you don't want it, just delete these 3 lines
for i in ${!radarr*}; do
printf '%b="%b"\n' "$i" "${!i}"
done
~\Downloads> gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify gpg4win-3.1.3.exe.sig
gpg: assuming signed data in 'gpg4win-3.1.3.exe'
gpg: Signature made 08/31/18 05:18:49 Pacific Daylight Time
gpg: using RSA key 42D876082688DA1A
gpg: requesting key 42D876082688DA1A from hkp server pgp.mit.edu
gpg: key 42D876082688DA1A: 80 signatures not checked due to missing keys
gpg: key 42D876082688DA1A: public key "Intevation File Distribution Key <distribution-key@intevation.de>" imported
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
@demonbane
demonbane / workflow-build.py
Created August 26, 2018 01:49 — forked from deanishe/workflow-build.py
Build Alfred Workflows into .alfredworkflow (zip) files
#!/usr/bin/python
# encoding: utf-8
#
# Copyright (c) 2013 deanishe@deanishe.net.
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2013-11-01
#

This is a simple proof of concept for doing Ombi updates live. The requirements to use this are:

  • You must have Ombi already installed and it must be running (obviously, since Ombi kicks off the update)
  • You must be using systemd to manage Ombi
  • The user that Ombi runs as must have permissions to run systemctl restart
    • Use visudo to edit your sudoers and add a line like:
      ombiuser ALL=NOPASSWD: /bin/systemctl restart ombi.service
      

Where ombiuser is the user Ombi runs as. You should also sanity check your system to make sure that systemctl is at /bin/systemctl and that your Ombi unti file is called ombi.service.

@demonbane
demonbane / CentOS 7
Last active April 20, 2018 02:12
/etc/os-release for CentOS/Debian/Fedora/OpenSUSE/RHEL/SLES/Ubuntu
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
~# foo='one
> two
> three'
~# hd <<< $foo
00000000 6f 6e 65 20 74 77 6f 20 74 68 72 65 65 0a |one two three.|
0000000e
~# hd <<< "$foo"
00000000 6f 6e 65 0a 74 77 6f 0a 74 68 72 65 65 0a |one.two.three.|
0000000e
~# bash --version

Keybase proof

I hereby claim:

  • I am demonbane on github.
  • I am demonbane (https://keybase.io/demonbane) on keybase.
  • I have a public key whose fingerprint is 9584 D5C6 0538 9579 552A 2368 9EA1 AAC6 985B 9388

To claim this, I am signing this object:

UTQHPRlnHHOi+dTtbMSkQWaprnPKUKfizoPJnvBGg9Omeqkppp5Ydg==
@demonbane
demonbane / makeapp.sh
Created July 5, 2011 20:05
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"