Skip to content

Instantly share code, notes, and snippets.

@gruber
gruber / Split Tabs to New Window.scpt
Last active May 5, 2024 16:58
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,
@MatthiasLohr
MatthiasLohr / README.md
Last active April 2, 2024 18:15
Beelink GTR5 + Proxmox + Windows Guest VM

Beelink GTR5 + Proxmox VE + Windows Guest using the Vega8 Graphics Card

Prerequisites

Hardware

  • Current BIOS version: 5.19
  • 1TB Kingston NVMe SSD (shipped with the device, used for system)
  • 1TB Samsung 860 EVO 2.5" SATA SSD (bought additionally, for Windows 10)
  • Installation images for Proxmox VE, Windows 10 (e.g. using Ventoy)
@dcode
dcode / howto_grandstream_device_to_unifi_talk.md
Created November 30, 2021 15:23
How to setup a Grandstream phone as a device on UniFi Talk

How to setup Grandstream DP750 for Unifi Talk

I've seen several posts on Reddit and other forums that say "oh you can use a grandstream phone with UniFi Talk and it's flawless". Unfortunately, I am not a VoIP engineer so it was not intuitive to me, but I got it to work. Here's how.

For this writeup, I'm using a Grandstream DP750 DECT base with a DP720 DECT wireless handset. I really wanted a wireless phone for general use in my house, but Ubiquiti doesn't make one, so I wanted to find a way. My goal is to setup UniFi Talk for my home phone solution and share a single phone number with a UniFi wired phone that sits on my office desk. As far as I know, you have to get a UniFi phone to do the initial Talk setup (though, in my tinkering, I noticed it's using a PostgreSQL database, you could probably bypass the initial setup if you knew what you were doing). I'm also using a UDM-Pro for my gateway.

Assuming your UDM-Pro management interface is on 192.168.1.1, your base station should be assigned an IP on a VL

@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active July 24, 2024 19:39
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@DJMarlow
DJMarlow / Flite_Sensor_Controller_DIY.md
Last active November 26, 2023 14:17
Flite Keg Sensor and Controller DIY

FLITE KEG SENSOR AND CONTROLLER DIY

This DIY will walk you through the steps to build your own Flite keg sensor and controller. Before getting started, it's recommended that you have the following tools and skills:


TOOLS

  • Drill press with drill bits for stainless steel
  • Soldering iron
  • 3D printer
@gavinr
gavinr / university-city-wards.geojson
Created August 18, 2020 00:14
Ward map of the City of University City, MO
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blakadder
blakadder / diffuserinha.yaml
Created May 6, 2019 08:58
Home Assistant configuration for the Oil Diffuser 550ML
fan:
- platform: mqtt
name: "Diffuser"
availability_topic: "tele/diffuser/LWT"
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "stat/diffuser/POWER1"
command_topic: "cmnd/diffuser/POWER1"
speed_state_topic: "stat/diffuser/FAN"
payload_low_speed: low
@fredrike
fredrike / __note.md
Last active September 22, 2021 14:16
hass.io on Synology
@finity69x2
finity69x2 / nws_wx_alert_custom.txt
Last active July 25, 2022 20:23
Home Assistant Configuration for Adding Weather Alerts from the US NWS using a Custom Sensor
This will allow several functions including a persistent pop-up notification on your HA front end, a notification to whichever notify service you use (I’m using Pushbullet in this example), and, if you use another custom component (https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639), it will also trigger an announcement to all of your Echo devices.
This integration uses a custom sensor.
you can find the code and the instructions for use at the following location:
https://github.com/eracknaphobia/nws_custom_component
NOTE: you will need to change the name of the file dep[ending on the version of ha you are installing it in. The instructions in that repo makes a note of that.
@turboBasic
turboBasic / Use-symmetric-key-to-encrypt-repository.md
Last active April 10, 2024 05:36
Use git-crypt & symmetric key kept inside a repo to encrypt some files in the repository

Use git-crypt & symmetric key kept inside a repo to encrypt some files in the repository

Requirements

  1. GnuPG aka "gpg"
  2. git-crypt

you may totally ignore complicated gpg manuals, but you must understand how git-crypt operates.