Skip to content

Instantly share code, notes, and snippets.

@SgtBatten
SgtBatten / frigate_0.11_notification.yaml
Last active December 7, 2023 20:09 — forked from hunterjm/frigate_0.10_notification.yaml
Frigate Notifications have moved
blueprint:
name: Frigate Notifications by SgtB have moved
description: |
## ANNOUNCEMENT
I have moved from this gist to a github repositry.
Please checkout https://github.com/SgtBatten/HA_blueprints for the latest versions
domain: automation
@Dasutin
Dasutin / retronas_on_unraid.md
Last active April 20, 2024 08:35
RetroNAS on Unraid

RetroNAS on Unraid

This guide is intended for installing RetroNAS on an already configured Unraid server. If you're not familiar with Unraid or RetroNAS, head over to the RetroNAS GitHub page to learn about RetroNAS and consider setting it up on a Raspberry Pi.

Unraid NFS Setup

Within Unraid, enable NFS by going to Settings and NFS.

  • Enable NFS: Yes
  • Click Apply
@TheCyberQuake
TheCyberQuake / TwitchTvEmbedOnlyWhenLive.html
Last active April 16, 2024 19:39 — forked from capperstrnd/TwitchTvEmbedOnlyWhenLive.html
A simple script for embedding Twitch stream only when the channel is live, otherwise it is hidden.
<html>
<head>
<style>
.hide { display:none; }
/* Optional: The following css just makes sure the twitch video stays responsive */
#twitch {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
@y-fedorov
y-fedorov / vpn_run.scpt
Last active January 17, 2023 07:50
Cisco AnyConnect Secure Mobility Client on MacOS autofill password and connect (apple script) (version 2.0)
--
-- Yaroslav Fedorov <Y.Fedorov@reg40.net>
-- 11/14/2016
-- URL (http://indy-world.net/2016/11/cisco-anyconnect-secure-mobility-client-on-macos-autofill-password-and-connect-apple-script-version-2-0/)
set userLoginName to "<<user_login>>"
set keychainRecordName to "cisco_any_connect_auth"
set serverUri to "vpn.company.com"
on getPassword(keychainItemName)
@insidegui
insidegui / WebCacheCleaner.swift
Created September 14, 2016 23:12
Clear WKWebView's cookies and website data storage, very useful during development.
import Foundation
import WebKit
final class WebCacheCleaner {
class func clean() {
HTTPCookieStorage.shared.removeCookies(since: Date.distantPast)
print("[WebCacheCleaner] All cookies deleted")
WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in
@cocoalabs
cocoalabs / gist:2fb7dc2199b0d4bf160364b8e557eb66
Created August 15, 2016 21:50
Color Terminal for bash/zsh etc..
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
@jstanley23
jstanley23 / lucene_reset.sh
Created March 31, 2016 15:20
Zenoss lucene reset
zeneventserver stop
rm -rf $ZENHOME/var/zeneventserver/index
rm -rf $ZENHOME/var/zeneventserver/index/archive
zeneventserver start
@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@d12frosted
d12frosted / MarIO.lua
Created June 15, 2015 08:14
MarI/O by SethBling
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
"B",
"X",
@Belphemur
Belphemur / bridge-conf
Last active January 29, 2024 11:45
Configuration and scripts for OpenVPN in Bridged Mode. Script to generate new client (with their keys and configuration file for OpenVPN). Script to manage the bridge. Configuration for systemd to start/stop the OpenVPN with Brige.
#!/bin/bash
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth0"
eth_ip="192.168.42.2"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.42.255"
eth_gateway="192.168.42.1"
eth_mac="XX:XX:XX:XX:XX:XX"