Skip to content

Instantly share code, notes, and snippets.

View UVClay's full-sized avatar
👽
i cant believe my eyes

clay UVClay

👽
i cant believe my eyes
View GitHub Profile
@UVClay
UVClay / send-camera-snapshot-notification-on-doorbell.yaml
Last active September 20, 2023 21:25 — forked from aceindy/send-camera-snapshot-notification-on-doorbell.yaml
Send a camera snapshot when doorbell was activated based on Vorion’s motion detection
blueprint:
name: Send a camera snapshot when doorbell was activated
description: 'This automation blueprint creates a camera snapshot when the doorbell was activated and
sends a notification to your phone with the picture.
'
domain: automation
input:
binary_sensor:
name: Push button
@UVClay
UVClay / unifi-controller.xml
Created February 17, 2021 17:58
UniFi Controller firewalld service
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>UniFi Controller</short>
<description>The UniFi Controller application allows you to manage all your UniFi networking devices from a single console.</description>
<port protocol="tcp" port="8443"/><port protocol="tcp" port="8080"/><!-- HTTP and HTTPS Interface (required)> -->
<port protocol="tcp" port="8880"/><port protocol="tcp" port="8843"/><!--HTTP and HTTPS Guest Portals -->
<port protocol="udp" port="10001"/><!-- AP Discovery -->
<port protocol="udp" port="3478"/><!-- STUN port -->
<port protocol="udp" port="1900"/><!-- L2 Discovery -->
<port protocol="tcp" port="6789"/><!-- Mobile speed test -->
@UVClay
UVClay / uyd.py
Created April 20, 2017 17:19
Uhh Yeah Dude episode downloader
#!/usr/bin/python3
#uyd archive scraper
from htmldom import htmldom
import urllib
links = ""
epcount = 2
try:
[
// Bot 2 (advanced options):
{
"nickname": "test",
"server": "irc.bottest.org",
"discordEmail": "user@mail.com",
"discordPassword": "letmein123",
"autoSendCommands": [ // Commands that will be sent on connect
["PRIVMSG", "NickServ", "IDENTIFY password"],
["MODE", "test", "+x"],
#! /usr/bin/env python
#
# Example program using irc.bot.
#
# Joel Rosdahl <joel@rosdahl.net>
"""A simple example bot.
This is an example bot that uses the SingleServerIRCBot class from
irc.bot. The bot enters a channel and listens for commands in
private messages and channel traffic. Commands in channel messages
@UVClay
UVClay / loop.sh
Created November 19, 2015 18:01
OS X Screenshot Upload Utility
#!/bin/bash
# OS X Screenshot Automation
# github.com/uvclay/osx-ss
# Alpha whatever it works so who cares
# Requires: fswatch, terminal-notifier
# TODO: Installer
# TODO: Notification area icon
# TODO: launchctl daemon
# TODO: Rewrite awful bash loop in Python
@UVClay
UVClay / kodi-info-check.php
Created October 30, 2015 15:12
Kodi media info scanner
<?php
$dir = getcwd();
$tvr = array("banner.jpg", "clearart.png", "logo.png", "fanart.jpg", "tvshow.nfo");
$mvr = array("fanart.jpg", "poster.jpg", "movie.nfo");
$tvd = array("/anime", "/tv");
$mvd = array("/movies");
foreach ($mvd as $wd){
$newdir = $dir.$wd;
@UVClay
UVClay / maprip.py
Created June 1, 2015 00:16
Move workshop maps to the main directory
__author__ = 'Clay'
import os, shutil
path = '/home/gungame/csgo/csgo/maps/workshop'
new = '/home/gungame/csgo/csgo/maps'
for dirname, dirnames, filenames in os.walk(path):
for filename in filenames:
fname_path = os.path.join(dirname, filename)
fext = os.path.splitext(fname_path)[1]
@UVClay
UVClay / synctube
Created August 7, 2014 15:04
/etc/init.d/synctube
# /etc/init.d/synctube
### BEGIN INIT INFO
# Provides: synctube
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Should-Start: $named $time
# Should-Stop: $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the synctube process