Skip to content

Instantly share code, notes, and snippets.

View radimklaska's full-sized avatar
:octocat:
Working from @cowosedlice. Stop by. ;-)

Radim Klaška radimklaska

:octocat:
Working from @cowosedlice. Stop by. ;-)
View GitHub Profile
blueprint:
name: RK ZHA - IKEA Tradfri on/off switch
description: |
"Control your light(s) with IKEA Tradfri on/off switch
Select the Tradfri remote and your lights.
You can turn the lights On / Off, or hold the buttons to dim the lights"
domain: automation
input:
remote:
@radimklaska
radimklaska / sandbox
Created December 10, 2021 15:20
Lando quick sandbox
#!/usr/bin/env bash
runtime=$(LANG=en_us_88591; date +"%Y-%m-%d-%A-%H-%M-%S")
# all lowercase
runtime=sandbox-${runtime,,}
mkdir $runtime
cd $runtime
lando init --source cwd --recipe drupal9 --webroot web --name $runtime --yes
lando start
#!/bin/sh
# What's the latest adminner version?
tag=$(curl --silent "https://api.github.com/repos/vrana/adminer/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
version=$(echo "${tag//v}")
# Download adminer.
curl -o /var/www/html/adminer.php https://github.com/vrana/adminer/releases/download/${tag}/adminer-${version}.php

Keybase proof

I hereby claim:

  • I am radimklaska on github.
  • I am radimklaska (https://keybase.io/radimklaska) on keybase.
  • I have a public key ASDXt7P_qtbIVtni_h5MrRjwW3u_vzeUZGHcigo15FuxXgo

To claim this, I am signing this object:

#!/bin/bash
# https://stackoverflow.com/questions/9612090/how-TARGET-loop-through-file-names-returned-by-find
echo "============================="
echo "============================="
echo "====== Initial cleanup ======"
echo "============================="
echo "============================="
✔ rk:~> # connected via cable, path out: this pc - gigabit switch - box
✔ rk:~> ping google.com
PING google.com(prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e)) 56 data bytes
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=1 ttl=53 time=12.0 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=2 ttl=53 time=11.9 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=3 ttl=53 time=11.9 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=4 ttl=53 time=31.8 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=5 ttl=53 time=11.7 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=6 ttl=53 time=12.8 ms
64 bytes from prg03s05-in-x0e.1e100.net (2a00:1450:4014:80c::200e): icmp_seq=7 ttl=53 time=11.6 ms

2020-01-11 @ 23:20:14 -- Running - OS: Linux, Chrome: 63.0.3239.108, Configurator: 1.1.0

2020-01-11 @ 23:20:25 -- Serial port successfully opened with ID: 1

2020-01-11 @ 23:20:25 -- MultiWii API version received - 1.42.0

2020-01-11 @ 23:20:25 -- Flight controller info, identifier: BTFL, version: 4.1.2

2020-01-11 @ 23:20:25 -- Running firmware released on: Dec 22 2019 02:19:57

@radimklaska
radimklaska / gopro_hevc_to_dnxhd.sh
Created February 18, 2019 13:31 — forked from ncoder-1/gopro_hevc_to_dnxhd.sh
Convert GoPro Hero7 videos (mainly HEVC) to DNxHD and AAC to PCM which can be read with DaVinci Resolve 15 in Linux
#!/usr/bin/env bash
#
# Convert GoPro Hero7 videos (mainly HEVC) to DNxHD and AAC to PCM which can be read with DaVinci Resolve 15 in Linux
# Also keeps GoPro's metadata
#
# Required dependency: ffmpeg 4.1
# To do: per-stream error handling, actually use datastream count and more efficient parsing of ffprobe
#
# Free for the taking.
#