Skip to content

Instantly share code, notes, and snippets.

View edub9's full-sized avatar

Eric Walton 9 Aka. Edub9 edub9

View GitHub Profile
@romanvm
romanvm / multi_select.py
Last active March 22, 2020 19:13
The example of a multi-select dialog in a Kodi addon created with PyXBMCt framework
# The example of a multi-select dialog in a Kodi addon created with PyXBMCt framework.
# You will need a checkmark image file.
import os
import xbmcgui
import xbmcaddon
import pyxbmct.addonwindow as pyxbmct
_addon = xbmcaddon.Addon()
_path = _addon.getAddonInfo("path")
_check_icon = os.path.join(_path, "check.png") # Don't decode _path to utf-8!!!
@dallasanger
dallasanger / gist:11689e2783afa30623f0
Created October 26, 2015 22:49
slot machine in php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Slot Machine</title>
</head>
<body>
<?php
/************
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active July 25, 2024 10:23
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@satmandu
satmandu / build_rstudio_focal.sh
Last active August 27, 2022 15:44
COMPLETELY UNSUPPORTED way to build rstudio from the v1.3-patches branch with QT 5.15 for ubuntu/20.04 focal & R 4.0. Put both files in the same directory. Note a docker install is needed for this to work.
#!/bin/bash -ex
git_branch="v1.3-patch"
git_base="https://github.com/rstudio/rstudio"
QT_VERSION=5.15.0
now=$(date +"%m%d%Y%H%M")
#docker build --pull --no-cache -f Dockerfile.focal-amd64 -t rstudio:focal-amd64 .
# following from https://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
@niemyjski
niemyjski / motion_light_illuminance.yaml
Created December 15, 2020 01:40
homeassistant blueprint - Turn on a light when motion is detected and Illuminance is low.
blueprint:
name: Turn the light on when motion is detected
description: Turn on a light when motion is detected and Illuminance is low.
domain: automation
source_url: https://github.com/niemyjski/home-assistant-config/tree/master/blueprints/automation/niemyjski/motion_light.yaml
input:
motion:
name: Motion Sensor
description: The motion sensor wich triggers the light to turn on
selector:
@networkingcat
networkingcat / yet_another_motion_automation.yaml
Last active July 24, 2024 19:42 — forked from quallenbezwinger/motion_controlled_scenes_enhanced.yaml
Homeassistant blueprint for motion-activated light scene
blueprint:
name: Yet Another Motion Automation
description: >
# YAMA V10
Turn on lights or scenes when motion is detected.
Four different scenes can be defined depending on time of day.
blueprint:
name: Target temperature adjustment depending on second temperature sensor (Fahrenheit)
description: >
Sets target temperature depending on second temperature sensor.
This blueprint is inspired by this blueprint https://community.home-assistant.io/t/tado-set-offset-using-separate-temperature-sensor/288515
created by Sanderma. Since not all thermostat devices have an configurable
offset, this blueprint sets the target temperature of the thermostat device
depending on a given target temperature and a second temperature sensor.
domain: automation
input:
@nevesenin
nevesenin / climate_control_persist_values.yaml
Last active February 7, 2022 20:39
homeassistant_climate_control
blueprint:
name: Climate Control Persist Values
description: Stores climate control configuration
domain: automation
input:
climate_source:
name: Source Thermostat
description: Climate entity which will send the temperature update
selector:
entity:
# Dumb way to control humidity in Bathroom using mechanical ventillation fan.
# It tries to be quiet and enable fan after people leave the room, except it is really necessary.
# Fan is usually turned on in periods when light is off.
# original version:
# https://github.com/KrzysztofHajdamowicz/home-assistant-blueprints/
blueprint:
name: Humidity controller
description: Turn on and turn off your fan according to humidity and (assumed) user presence.
domain: automation