Skip to content

Instantly share code, notes, and snippets.

View riccardolardi's full-sized avatar
🛹

Riccardo Lardi riccardolardi

🛹
View GitHub Profile
const inputBody = {
"mobility": {
"car": {
"petrol": 0,
"biogas": 0,
"diesel": 0,
"electric": 0,
"hydrogen": 0,
"naturalGas": 0,
"syntheticFuel": 0,
<template>
<div class="wrap">
<div class="page">
<div class="grid-stack" />
<span class="divider" />
</div>
</div>
</template>
<script setup>
<?php
use craft\elements\Entry;
use craft\helpers\UrlHelper;
return [
'endpoints' => [
'acts.json' => function() {
return [
'pretty' => true,
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running
const shifty = require('shifty')
console.log(shifty)
shifty.tween({
from: {
x: 0
}, to: {
x: 10
}, step: state => console.log(state)
}).then(() => console.log('done'))
this.setState(state => {
view: {
...state.view,
lat: coords.lat,
lon: coords.lon
}
})
// .js instead of .json for convenience
{
"id": "string",
"original-loc": {
"lat": "double",
"lon": "double"
},
"name": "string",
"tag": "string",
"country-code": "string",
{
"name": "Switzerland",
"view": {
"zoom": 34, // changable by maptool
"lat": 46.7310679, // changable by maptool
"lon": 6.2670205 // changable by maptool
},
"places": [
{
"type": "federation",
(async () => {
let response, configJson
try {
response = await fetch('./config.json')
configJson = await response.json()
} catch(error) {
configJson = {
"fallback": true
}
}
const {performance} = require('perf_hooks')
let lastTs, newTs
const desiredFps = 30.0
const interval = () => {
lastTs = newTs
newTs = performance.now()
const err = newTs - lastTs - 1000.0 / desiredFps
const newDelay = 1000.0 / desiredFps - err
setTimeout(interval, newDelay)
}