Skip to content

Instantly share code, notes, and snippets.

@sbyx
sbyx / wake-up-light-alarm-with-sunrise-effect.yaml
Last active July 5, 2024 06:01
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@miguelmota
miguelmota / buildspec.yml
Last active October 18, 2021 03:23
AWS CodePipeline CodeBuild middleman build deploy to S3 and invalidate cloudfront cache
version: 0.1
phases:
install:
commands:
- apt-get update
- apt-get install nodejs -y
- gem install bundler
- gem install middleman
pre_build:
commands:
@sobstel
sobstel / nokogiri_install
Created January 3, 2017 17:30
nokogiri -> ERROR: cannot discover where libxml2 is located on your system
# `ERROR: Error installing nokogiri:
# ERROR: Failed to build gem native extension.
#
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries
# checking if the C compiler accepts ... yes
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
# Building nokogiri using system libraries.
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
# *** extconf.rb failed ***
@matthijsgroen
matthijsgroen / stub
Last active December 17, 2015 20:48
Command line stubs
#!/usr/bin/env ruby
# a clever way to stub the calls to bundle:
# put this file in fixtures and give the proper permissions:
# chmod +x spec/fixtures/bundle
# see spec/publish_spec.rb for usage:
# add path to the bundle stub to the beginning of the PATH env. var.
# Now when bundle is called, this stub file is used.
command = File.basename(__FILE__)