This is a recipe for creating a list of chores that repeat. You can track the last time they were completed, and the button changes color based on how long it's been since it was last done.
Requirements
<?php | |
// Generate an array of color hex codes between a start and an end color | |
function heatSteps ($config) { | |
$config['colorStart'] = (isset($config['colorStart']) == true) ? hexdec($config['colorStart']) : 0xdee7f8; | |
$config['colorEnd'] = (isset($config['colorEnd']) == true) ? hexdec($config['colorEnd']) : 0xff0f15; | |
$config['colorSteps'] = (isset($config['colorSteps']) == true) ? $config['colorSteps'] : 10; | |
$config['colorStart'] = (($config['colorStart'] >= 0x000000) && ($config['colorStart'] <= 0xffffff)) ? $config['colorStart'] : 0x000000; | |
$config['colorEnd'] = (($config['colorEnd'] >= 0x000000) && ($config['colorEnd'] <= 0xffffff)) ? $config['colorEnd'] : 0xffffff; |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
//https://github.com/davecgh/go-spew | |
//"go-spew/spew" |
This is a recipe for creating a list of chores that repeat. You can track the last time they were completed, and the button changes color based on how long it's been since it was last done.
Requirements