Skip to content

Instantly share code, notes, and snippets.

View andras-tim's full-sized avatar
💭
I may be slow to respond.

Andras Tim andras-tim

💭
I may be slow to respond.
View GitHub Profile
@andras-tim
andras-tim / esp32-s3-box-3.yaml
Last active January 9, 2026 22:20
ESP32 S3 Box 3 with sensors
---
# Official config doesn't support the sensor dock, and once you extend the
# https://github.com/esphome/wake-word-voice-assistants/blob/main/esp32-s3-box-3/esp32-s3-box-3.yaml you will face with some
# audio incompatibility too.
packages:
esphome.voice-assistant: 'github://esphome/wake-word-voice-assistants/esp32-s3-box-3/esp32-s3-box-3.yaml@main'
@andras-tim
andras-tim / .dockerignore
Last active March 1, 2023 03:38
Sanoid .deb builder
*.deb
@andras-tim
andras-tim / user-data-gpt-bios-btrfs.yaml
Last active August 28, 2020 03:35 — forked from wpbrown/user-data.yaml
ubuntu autoinstall with btrfs subvolumes
#cloud-config
# based on
# * https://ubuntu.com/server/docs/install/autoinstall-quickstart
# * https://curtin.readthedocs.io/en/latest/topics/storage.html
# * https://gist.github.com/wpbrown/b688a934339cb4228c3faf5b527fbe5b
autoinstall:
version: 1
{
"title": "JSON Schema for autoinstall config",
"$schema": "https://ubuntu.com/server/docs/install/autoinstall-schema",
"type": "object",
"properties": {
"autoinstall": {
"type": "object",
"properties": {
"version": {
"type": "integer",
@andras-tim
andras-tim / doci
Last active June 4, 2020 08:24 — forked from szz/doci
get the prefered interactive shell in a given docker conatiner
#!/bin/bash
set -eufo pipefail
SHELL_PREFERENCE=(
'bash'
'zsh'
'sh'
)
@andras-tim
andras-tim / README.md
Last active July 8, 2020 01:37
Phoscon sensor rename utility

Phoscon device rename utility

This is a mass device rename utility for Phoscon. You can set unique names for all sensors and lights not only per devices.

Usage

python3 rename_sensors.py 'http://phoston_app_url:2080' 'API_KEY'
  1. The first run will dump the current config from the Phoscon to devices.json
  2. Edit the names in the devices.json w/ your favorite editor
@andras-tim
andras-tim / README.md
Last active May 10, 2019 14:26
Call user32.ShowWindow on (Internet) Explorer windows by path

show_window.py

Call ShowWindow() of shell32.dll for manage size of (Internet) Explorer windows by path.

Install

pip install --user pywin32
@andras-tim
andras-tim / fun.zsh
Last active September 21, 2021 11:53
I love pipes, redirects and named fds... in ZSH!
#!/usr/bin/zsh
set -e
# TAB indented file!
### PREPARATION ###
# mkdir test
# cd test
# wget -q https://gist.github.com/andras-tim/f8aebf9243cecf3719d27d020a718ef8/raw/fun.zsh -O - | zsh
#!/bin/bash
set -eufo pipefail
shopt -s extglob
patterns=''
for pattern in "$@"; do
patterns+="${pattern}|"
done
while read -r i; do
@andras-tim
andras-tim / README.md
Last active April 11, 2017 12:29
How can I filter STDIN by globbing in bash?

http://stackoverflow.com/q/43344791/1108919

Problem

I want to rewrite filter_script.sh to accepts globbing patter only instead of regexp (current working)

Expected

Test

echo -e 'apple tree\nbanana tree\norange tree' | ./filter_script.sh '*ban' '*ge*'