Effectively an easy way to call setTimeout() from within an async function.
note: This will only wait at least this many ms before execution continues.
const sleep = ms => new Promise(res => setTimeout(res, ms));
// Usage| #!/usr/bin/env python3 | |
| """ | |
| Bridge: export OpenClaw SQLite cron data → legacy flat files for ClawMetry. | |
| OpenClaw v2026.6.5+ stores everything in state/openclaw.sqlite. | |
| ClawMetry v0.12.535 still reads cron/jobs.json and cron/runs/*.jsonl. | |
| Run this periodically (e.g., every 15 min) to keep ClawMetry in sync. | |
| """ | |
| import sqlite3, json, os |
| #!/bin/bash | |
| # Note: to change user password - sudo passwd USERNAME | |
| # Check if root | |
| # To run command as current user: sudo -u $curr_user | |
| if ! [ $(id -u) = 0 ]; then | |
| echo "Server Setup needs to be run as root." >&2 | |
| exit 1 | |
| else |
| #cloud-config | |
| package_update: true | |
| package_upgrade: true | |
| packages: | |
| - nginx | |
| - git | |
| users: | |
| - name: xander |
| @mixin simpleSpace { | |
| // margin and padding values | |
| $spacings: ( | |
| 0, | |
| .25rem, | |
| .5rem, | |
| 1rem, | |
| 1.5rem, | |
| 2rem, |
| /** | |
| * @author qiao / https://github.com/qiao | |
| * @author mrdoob / http://mrdoob.com | |
| * @author alteredq / http://alteredqualia.com/ | |
| * @author WestLangley / http://github.com/WestLangley | |
| * @author erich666 / http://erichaines.com | |
| */ | |
| // This set of controls performs orbiting, dollying (zooming), and panning. | |
| // Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). |