carto_slam.data
customer_map_list_path.plan
first_hardware_unbunding_flag.ini
resume_data.info
scheme_data.info1640869826
unfinished_carto_slam.data
unfinished_data.info
This file contains 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
import { randomUUID } from "crypto"; | |
import { EventEmitter } from "events"; | |
import express from "express"; | |
function formatEvent(event) { | |
const { event = "message", data = {}, id = randomUUID(), retry = undefined } = event; | |
const resultString = retry ? `retry: ${retry}\n` : ""; | |
resultString += `id: ${id}\n`; | |
resultString += `event: ${event}\n`; |
This file contains 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
import { useEffect, useState } from "react"; | |
import { StopwatchLap } from "types/schemas/stopwatch-lap"; | |
import getTimeFromMiliseconds from "./lib/get-time-from-miliseconds"; | |
const STOPWATCH_TICK_MILISECONDS = 10; | |
export declare interface UseStopwatchValues { | |
isRunning: boolean; | |
isEnded: boolean; | |
totalTime: number; // total time if always forward but the calculation can be backwards |
This file contains 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
import { useCallback, useEffect, useState } from 'react'; | |
const commonEvent = (event) => { | |
event?.preventDefault?.(); | |
event?.stopPropagation?.(); | |
event?.stopImmediatePropagation?.(); | |
}; | |
export default function useKeyboardShortcut() { | |
const [shortcuts, setShortcuts] = useState([]); |
This file contains 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
function getURLParams(urlWithParams) { | |
const paramsURLParts = urlWithParams.split('/'); | |
let params = {}; | |
for (const index in paramsURLParts) { | |
let parsedParam; | |
let part = paramsURLParts.at(index); | |
if (part.match(/:([\w_]{1}[\w0-9-_]+)/i)) { | |
part = part.replace(':', ''); | |
} | |
// Optional |
This file contains 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
[Device_Config] | |
software_version=S3.2.6.25.06R | |
hardware_version=1.0.1 | |
robot_app_version=5 | |
algorithm_version=2.0.1.180301_Alpha25 | |
stm32_version=1.0.0_19052806 | |
lidar_version=LIDAR_VERSION_UNKNOW | |
device_id=3.506000e+03 | |
device_type=23 | |
voice_enable=1 |
This file contains 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
# Vacuum-extended-config | |
# Versión: 1.0.0 | |
# Autor: Gabriel Trabanco Llano <gtrabanco@users.noreply.github.com> | |
# https://github.com/gtrabanco https://keybase.io/gtrabanco | |
# LICENCIA: SIN LICENCIA. Haz lo que quieras pero la atribución es bien recibida | |
# por mi ego. | |
# | |
# There is a english version here: https://gist.github.com/gtrabanco/87320443dcd30ac10990f87b0c423e19 | |
# Puedes agregar este archivo por partes incrustandolo en tu configuración por partes o |
This file contains 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
[{"id":"6d1ab575c8ee62e1","type":"subflow","name":"Conditional Clean Segments","info":"Requirements:\n- [Extra configuration for the vacuum](https://gist.github.com/gtrabanco/87320443dcd30ac10990f87b0c423e19)","category":"","in":[{"x":60,"y":260,"wires":[{"id":"291669f61c673f20"}]}],"out":[{"x":1780,"y":180,"wires":[{"id":"fd8a618a491d08a4","port":0}]},{"x":1780,"y":260,"wires":[{"id":"fd8a618a491d08a4","port":1}]}],"env":[{"name":"has_map_sensor","type":"str","value":"binary_sensor.vacuum_has_pending_map","ui":{"label":{"en-US":"Entity of binary sensor for pending map"},"type":"input","opts":{"types":["str"]}}},{"name":"segments","type":"json","value":"[]","ui":{"label":{"en-US":"Array of segments to be cleaned ("},"type":"input","opts":{"types":["num","json"]}}},{"name":"segments_sensor","type":"str","value":"sensor.map_segments","ui":{"label":{"en-US":"Sensor that has the segments"},"type":"input","opts":{"types":["str"]}}},{"name":"mqtt_prefix","type":"str","value":"valetudo","ui":{"label":{"en-US":"MQTT |
This file contains 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
# Vacuum-extended-config | |
# Version: 1.0.0 | |
# Author: Gabriel Trabanco Llano <gtrabanco@users.noreply.github.com> | |
# https://github.com/gtrabanco https://keybase.io/gtrabanco | |
# LICENSE: UNLICENSED. Do whatever you want with this stuff but attribution will be | |
# very welcome from my ego. | |
# Versión en español: https://gist.github.com/gtrabanco/476bc119448319a1db510f6948361f47 | |
# You can add this file entirely but need to change <valetudo_or_ha_ip> and <valetudo_port> manually. |
This file contains 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
#!/usr/bin/env bash | |
#shellcheck disable=SC2206,SC2207 | |
ipv4_netmask() { | |
local IFS='.' netmask=() rest_bits tmp_netmask=0 | |
local -r bits="${1:-0}" | |
if [[ $bits -lt 0 || $bits -gt 32 ]]; then | |
echo "Error: IPv4 netmask should be between 0 and 32" 1>&2 | |
return 1 |