Skip to content

Instantly share code, notes, and snippets.

View asaf400's full-sized avatar

Asaf Levy asaf400

View GitHub Profile
"""
S3 Batch Replication Job Provider (Pulumi Dynamic Resource)
This module provides a Pulumi dynamic resource to create and manage AWS S3 Batch Replication
jobs using the S3 Control CreateJob API via Boto3.
While standard "live" replication rules only apply to newly created objects, S3 Batch Replication
allows you to backfill and replicate existing objects.
Reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-batch-replication-batch.html
blueprint:
name: Auto Light Group by Reference
description: >
Select a "Reference Device" (e.g., one specific IKEA bulb).
This automation will automatically find ALL other lights in your system
that match that device's Manufacturer and Model exactly and add them to a group.
domain: automation
input:
group_id:
name: Group Entity ID
@asaf400
asaf400 / create_group2.yaml
Last active September 15, 2025 18:58 — forked from mwolter805/create_group.yaml
Home Assistant Blueprint: Create a group with either dynamic or with static members.
blueprint:
name: Create Group
description: |
# Create Group Blueprint
This blueprint creates a group with either static or dynamic members.
(extended with ability to filter by Area)
domain: automation
source_url: https://gist.github.com/mwolter805/965fb5c3b4d6bf8e9aeba8acd82fd224
input:
@asaf400
asaf400 / download-gallery-links.py
Created September 1, 2025 20:26
Watches Windows clipboard for links, and checks attempts download of supported sites via `gallery-dl` or `yt-dlp`
@asaf400
asaf400 / blacklist.txt
Created September 9, 2024 23:03
LG TV WebOS blocking
ad.lgappstv.com
aic-gfts.lge.com
aic-ngfts.lge.com
aic-op-lss.lgthinq.com
aic.api.lgtviot.com
aic.homeprv.lgtvcommon.com
aic.lgtviot.com
aic.nudge.lgtvcommon.com
aic.rdl.lgtvcommon.com
aic.recommend.lgtvcommon.com
@asaf400
asaf400 / Anti-Xeno.ahk
Last active August 17, 2023 23:46
Elite Dangerous Fire Groups keybinding with AutoHotKey
; written by https://github.com/asaf400
; version 0.3
; Settings
gameLocation := "H:\SteamLibrary\steamapps\common\Elite Dangerous"
; Change log file location
global LogFile := "H:\SteamLibrary\steamapps\common\Elite Dangerous\AX.log"
@asaf400
asaf400 / EasyAutoShift.ahk
Last active August 11, 2023 14:51
Mimic the ROCCAT™ Easy-Shift[+]™ feature using AutoHotKey for use with other gaming mice.
; written by https://github.com/asaf400
; well, not really.. Thanks ChatGPT :)
; This is an EasyShift (ROCCAT™ Easy-Shift[+]™) implementation in AHK dubed - EasyAutoShift
; Initialize variables
global awaitingEASButton := false
; List of AHK keys: https://www.autohotkey.com/docs/v1/KeyList.htm
; Define the hotkey for XButton1 (Mouse4) press - EasyAutoShift button
XButton1::
import os.path
import googleapiclient.discovery
import urllib.request
import datetime
# Script Written by LLM
# Set up API credentials - Created here (API Keys): https://console.cloud.google.com/apis/credentials
api_key = '' # Replace with your API key
@asaf400
asaf400 / aws-sso-lib.py
Last active January 14, 2025 09:17
This script is meant to be used as a backup, restore and convertion tool for AWS SSO (Identity Store & Identity Center)
#!/bin/env python
# AUTHOR: github.com/asaf400
# This script is meant to be used as a backup, restore and convertion tool for AWS SSO (Identity Store & Identity Center)
# Currently AWS does not provide any way to backup the following resources:
# Users & Groups in the Identity Store API,
# The Principal Assignment with an AWS Account and PermissionSet in the SSO Admin API
# The Permissions sets and their inline policies
# hench I created this script which allows for a backup in a relatively Human Readble JSON format
# it is able to backup to:
#!/bin/bash
# AUTHOR: github.com/asaf400
# This script iterates over all S3 objects in terraform state,
# in order to import any S3 resource that has been split from the main aws_s3_bucket resource
# following the terraform aws v4 breaking changes which requires existing s3 attributes to exists as 'linked' resources
# The script assumes that the hcl files has already been modifed to reflect the v4 change,
# and it is useful for allowing terraform to import the new resources which already existed in aws.
# SCRIPT IS DISTRIBUTED AS IS, NOT SUPPORT REQUESTS.
# The resources are: