Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
template: | |
- sensor: | |
- name: "Solar Panel Production W" | |
unique_id: solar_panel_production_w | |
unit_of_measurement: "W" | |
icon: mdi:solar-power | |
state: > | |
{% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %} | |
{% set b1_dc_power = states('sensor.solaredge_b1_dc_power') | float(0) %} |
Make sure you have:
Then:
# set "Apply to range" to whereever you want to apply setting. | |
# set "Format cells if..." to "Custom formula is" and paste following code | |
# Following Forumula will detect if it's match with regex or not. | |
=REGEXMATCH(INDIRECT("R[0]C[0]", false),"<PUT YOUR REGEX HERE>") = true | |
# set your "formatting style" | |
That's it! |
Here is a checklist of all the things I need my CSS solution to handle.
I can explain any of the points. Leave a comment on the gist or tweet @DavidWells
Challenge: Take your favorite CSS solution and see how the checklist holds up.
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
app = node[:rails][:app] | |
rails_base app[:name] do | |
ruby_ver app[:ruby_ver] | |
gemset app[:gemset] | |
end | |
%w{config log pids cached-copy bundle system}.each do |dir| | |
directory "#{app[:app_root]}/shared/#{dir}" do | |
owner app[:deploy_user] |