Skip to content

Instantly share code, notes, and snippets.

@jmerifjKriwe
jmerifjKriwe / automatic_blinds_shading.yaml
Last active February 2, 2024 14:56
automatic_blinds_shading.yaml
blueprint:
name: "New Shading - automatic driving for sun protection"
description: >-
**Version: 2024020202** <br />
This is an largely complete automation for roller shutters.
Two major areas are covered: a) daily raising and lowering, b) shading against too much sunlight.
For more information open:
<details>
In order to have extensive flexibility here, different sensors are used. But there is also the possibility to define an occupant of the room, so that e.g. the roller shutter does not go up in the morning, although the occupant is still sleeping.<br />

Build "Sources for Android 29" so you can comfortably browse the Android API source in Android Studio.

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@ragdroid
ragdroid / IfElse.kt
Created March 2, 2019 14:00
Simplified if-else
infix fun <T>Boolean.then(action : () -> T): T? {
return if (this)
action.invoke()
else null
}
infix fun <T>T?.elze(action: () -> T): T {
return if (this == null)
action.invoke()
@TheBox193
TheBox193 / gitDeleteMultiStash.sh
Created December 9, 2016 22:07
Selectively bulk delete git stash files.
#!/bin/bash
if [ ! -d ".git" ]; then
echo "Not a git Directory"
exit 1
fi
function getStashesToRemove {
git stash list | while read -r line;
do
read -p "remove branch: $line (y/N)?" answer </dev/tty;
@lopspower
lopspower / README.md
Last active May 6, 2026 09:03
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha: