Skip to content

Instantly share code, notes, and snippets.

View atishay's full-sized avatar

Atishay Jain atishay

View GitHub Profile
@blizzrdof77
blizzrdof77 / zha-moes-zigbee-rotary-smart-knob-remote-control.yaml
Last active February 7, 2026 12:40
ZHA - Moes Tuya Smart Knob (TS004F) controller for remote control devices
blueprint:
name: ZHA - Moes Tuya Smart Knob (TS004F) controller for remote control devices
description: Control remotes (e.g. volume up/down) with a Moes Tuya smart knob (the spinny ones). You can set functions for single press, rotating left, and rotating right.
domain: automation
source_url: https://gist.github.com/blizzrdof77/c30c388ca5f4ce7ed72752296767417d
input:
remote:
name: Smart Knob Device
description: Moes Tuya Smart Knob Device to use
selector:
@vuon9
vuon9 / README.md
Last active January 18, 2026 21:55
Powertoys - Keyboard Manager - Common macOS keys mapping

How to install

  • cd C:\Users\${username}\AppData\Local\Microsoft\PowerToys\Keyboard Manager
  • Backup file existing one of default.json
  • Download default.json and add it to the current folder

Mapped keys

key
Esc
@m-radzikowski
m-radzikowski / script-template.sh
Last active February 27, 2026 03:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@atishay
atishay / Token.md
Last active January 19, 2019 20:45
Copy Access Token to Clipboard

To copy access token to clipboard drag the bookmarklet to your bookmarks bar and then follow the following steps:

  1. Goto any adobe website.
  2. Login.
  3. Click on the bookmarket.

Code for the bookmarklet

javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}(window.adobeIMS.getAccessToken());
@dale3h
dale3h / telnet-wrapper.sh
Created April 19, 2018 03:24
[Home Assistant] Hass.io - Install Packages and Execute Telnet Command
#!/bin/bash
################################################################
## @usage telnet-wrapper.sh "uptime"
## @usage telnet-wrapper.sh "ping -c1 10.0.0.2"
## @description Install Alpine packages and run telnet command
## @license MIT
## @author Dale Higgs <@dale3h>
################################################################
@dfkaye
dfkaye / JSONPath-without-eval.js
Last active August 8, 2023 20:47
JSONPath.js modified ~ replace eval() in filter() with operate() and compare() methods
// STOLEN FROM GOOGLE CODE REPO 01 NOV 2014
// MODIFIED FOR
// + 1 Nov 2104 - READABILITY
// + 3 NOV 2014 - use (content security policy) no-eval() approach, see filter() method
// + 10 Dec 2014 - revised filter() with switch
// + 23 Feb 2015 - revised operate() and compare() methods
// + 28 July 2015 - bug fix: `attr` var in filter() wasn't `var'd`
// + 9 May 2018 - show test output