Everything built on top of the base OpenClaw platform. Canonical reference for what exists, where it lives, and how it works. Operational use cases and workflow playbooks live in
docs/USE-CASES-WORKFLOWS.md.
(The below text is licensed with CC0, which means that if you want to use or translate it, that is OK by me.)
Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺
Locally, I'm at this commit:
$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date: Sun Apr 15 16:35:03 2012 +0200
| // Queue class for serializing AJAX calls. | |
| // | |
| // Inspired by Raynos http://stackoverflow.com/a/4797596/1194060 | |
| // | |
| // Queue has a public append method that expects some kind of task. | |
| // A task is a generic function passed as callback. | |
| // Constructor expects a handler which is a method that takes a ajax task | |
| // and a callback. Queue expects the handler to deal with the ajax and run | |
| // the callback when it's finished |
| #!/bin/bash | |
| #set -x | |
| # Shows you the largest objects in your repo's pack file. | |
| # Written for osx. | |
| # | |
| # @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # @author Antony Stubbs |
| <?php | |
| function example_ajax_enqueue() { | |
| // Enqueue javascript on the frontend. | |
| wp_enqueue_script( | |
| 'example-ajax-script', | |
| get_template_directory_uri() . '/js/simple-ajax-example.js', | |
| array( 'jquery' ) | |
| ); |
I decided to share this snippet based on seeing what others were doing in this thread: https://www.reddit.com/r/homeassistant/comments/emvk9y/how_do_you_monitor_sensor_battery_levels_looking/
Basically dome device types of battery report the state in different locations and with different string
values that the change node or conditional logic just doesn't work nicely. Using the conditional logic on
this string state value might not be working fully how we think it is or at least didn't for me. When I was
debugging it and getting 10 outputted in a 100 bucket via the gt condition. The best way I've found to
handle these conditions is with a function node.
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) continue; | |
| if ((typeof ob[i]) == 'object') { | |
| var flatObject = flattenObject(ob[i]); | |
| for (var x in flatObject) { | |
| if (!flatObject.hasOwnProperty(x)) continue; |
| // vanilla JS | |
| var event = document.createEvent("UIEvents"); | |
| event.initUIEvent("change", true, true); | |
| document.querySelector('input[type=file]').dispatchEvent(event); | |
| // jQuery | |
| $('input[type=file]').trigger('change'); |
| function exceptionalException(message) { | |
| 'use strict'; | |
| if (exceptionalException.emailErrors !== false) { | |
| exceptionalException.emailErrors = confirm('We had an error reporting an error! Please email us so we can fix it?'); | |
| } | |
| } | |
| //test | |
| //exceptionalException('try 1!'); | |
| //exceptionalException('try 2!'); |