This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https'); | |
const ifttt = event => `https://maker.ifttt.com/trigger/${event}/with/key/${process.env.IFTTT_WEBHOOK_KEY}`; | |
exports.handler = async (event) => { | |
const time = new Date(); | |
const valid = time.getHours() >= 18; | |
const eventId = valid ? 'night' : 'other'; | |
await new Promise(r => https.get(ifttt(eventId), r)); | |
const response = { statusCode: 200, body: eventId }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CubeBehavior : MonoBehaviour | |
{ | |
const float threshold = 1f; | |
private readonly Quaternion quaternion = Quaternion.AngleAxis(90, Vector3.down); | |
public Vector3 direction = Vector3.forward * 0.1f; | |
// Update is called once per frame |
NewerOlder