Skip to content

Instantly share code, notes, and snippets.

View artipixel's full-sized avatar

Artipixel artipixel

  • Artipixel
  • Israel
View GitHub Profile
@artipixel
artipixel / tv_remote_movie_mode.yaml
Created January 1, 2023 18:34
Trigger movie mode automation
alias: TV remote movie mode
description: ""
trigger:
- platform: state
entity_id:
- media_player.android_tv
attribute: app_name
to: com.google.android.tv.remote.service
condition: []
action:
@artipixel
artipixel / bed-light.yaml
Created December 31, 2022 20:24
ESP Home Bed light
esphome:
name: "bed-light"
esp8266:
board: d1_mini
framework:
version: 2.7.4
wifi:
ssid: !secret wifi_ssid
@artipixel
artipixel / .zshrc
Created December 4, 2022 09:40
Kubernetes tools and shortcuts
# Shortcuts for Kubectl
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgd='kubectl get deployments'
alias kgs='kubectl get services'
alias kgi='kubectl get ingress'
alias kuc='kubectl config use-context'
# context example
@artipixel
artipixel / README.md
Created September 15, 2022 10:42
Kubernetes - AWS Karpenter auto scaling - specify a provisioner for a pod

Specify a specific provisioner for a pod

  1. Create your provisioner, important thing to add is a custom label and a value that we will use in node affinity on our pod.
  2. In your deployment, add under spec.template.spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
 - matchExpressions:
@artipixel
artipixel / automation.yaml
Last active November 8, 2023 20:16
התראות פיקוד העורף - Pikud Ha Oref Alerts - Home assistant
alias: Red alert
description: ''
trigger:
- platform: state
entity_id: binary_sensor.oref_alert
from: 'off'
to: 'on'
condition:
- condition: or
conditions:
@artipixel
artipixel / site_url_replace.php
Last active August 6, 2017 12:51
Wordpress simple domain replace [php file] - just load this file under wordpress installation.
<?php
require_once __DIR__."/wp-config.php";
global $table_prefix;
// Create connection
$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// Check connection