Put 2018-06-27-raspbian-stretch-lite.img on the SD card
Enable ssh:
sudo systemctl enable ssh
Update and install dependencies:
sudo apt-get update
sudo apt-get install \
Find encoding of a file: file -i *.fdf |
function centerCoordinates(coordinates) { | |
if (coordinates.length === 0) { | |
return coordinates; | |
} | |
let x, y, z; | |
x = y = z = 0; | |
coordinates.forEach(coordinate => { | |
const latitude = (coordinate[0] * Math.PI) / 180; |
li { | |
list-style-type: none | |
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle style="fill:#A7A7A7;" cx="10" cy="10" r="5"/></svg>') | |
background-repeat: no-repeat | |
background-position-y: center | |
padding-left: 2rem | |
} |
Put 2018-06-27-raspbian-stretch-lite.img on the SD card
Enable ssh:
sudo systemctl enable ssh
Update and install dependencies:
sudo apt-get update
sudo apt-get install \
sudo ln -sf /usr/share/zoneinfo/Europe/Oslo /etc/localtime # found in | |
sudo apt-get purge ntp* | |
sudo apt-get install chrony | |
sudo reboot |
get data: | |
http://10.0.0.5/json.htm?type=graph&sensor=counter&method=1&idx=611&range=day | |
delete data: | |
http://10.0.0.5/json.htm?type=command¶m=deletedatapoint&idx=611&date=2018-06-03%2019:55:00 | |
data.result.forEach(point => delete(611, point.d)); | |
function delete(idx, date) { | |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
const layout = "2006-01-02T15:04:05" | |
time1 := time.Now() |
<html> | |
<head></head> | |
<body> | |
<section id="app"> | |
<p>{{message}}</p> | |
<input v-model="message"> | |
</section> | |
<script src="https://unpkg.com/vue"></script> | |
<script> | |
new Vue({ |
<html> | |
<head></head> | |
<body> | |
<section id="app"> | |
<p>{{message}}</p> | |
<input v-model="message"> | |
</section> | |
<script src="https://unpkg.com/vue"></script> | |
<script> | |
new Vue({ |
const flattenArray = (x, y) => (x || []).concat(y); | |
// Usage: | |
[[1,2],[3],[4]].reduce(flattenArray); | |
// Or: | |
[[1,2],[3],[4]].reduce((x, y) => (x || []).concat(y)); |