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
backend="$1" | |
if [ -z "$backend" ]; then | |
echo "Please provide a backend URL" | |
return | |
fi | |
port="$2" | |
if [ -z "$port" ]; then | |
port=5555 | |
fi |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-gray; icon-glyph: traffic-light; | |
// To find your SITE_ID, go to https://transport.integration.sl.se/v1/sites?expand=true | |
// and search for your station. The SITE_ID is the number in the id field. | |
const SITE_ID = "9261"; | |
// Transport can be BUS, TRAM, METRO, TRAIN, FERRY, SHIP, TAXI | |
const TRANSPORT = "METRO"; |
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
#!/bin/bash | |
FLIPPER_APPS_DIR="/tmp/UberGuidoZFlipper" | |
FLIPPER_SD_DIR="/Volumes/Flipper SD" | |
if [ ! -d "$FLIPPER_SD_DIR" ]; then | |
echo "Flipper SD card not found at $FLIPPER_SD_DIR" | |
exit 1 | |
fi |
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
#!/bin/bash | |
IP="192.168.0.45" | |
MAC="AA-BB-CC-DD-EE-FF" | |
get_status() { | |
/usr/bin/curl -s "http://$IP:8090/json-rpc?request=%7B%22command%22:%22serverinfo%22%7D" | |
} | |
call_autostart() { |
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
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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
#!/bin/sh | |
set -e -o pipefail | |
MOUNT_TARGET="/usr/palm/applications/com.webos.app.screensaver/qml/main.qml" | |
QML_PATH="$(dirname "$(realpath "$0")")/screensaver-main.qml" | |
if [[ ! -f "$MOUNT_TARGET" ]]; then | |
echo "[-] Target file does not exist: $MOUNT_TARGET" >&2 | |
exit 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
function printBoard(board, method = "log") { | |
console[method](board.map((e) => e.join("")).join("\n")); | |
} | |
function createDiagonalMatrix(_) { | |
_.takenDiagonal = []; | |
_.diagonalMatrix = new Array(_.n).fill().map(() => new Array(_.n).fill(-1)); | |
// first row | |
for (let y = 0; y < _.n; y++) { |
This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.
- OpenVPN frontend (OpenVPN itself is easily buildable and runs on webOS TVs: https://discord.com/channels/407937994037919756/835489130967859251/906943542457401395)
- App autostart manager - dynamically update arbitrary app config and register it as input (see Registering an app as an input)
- webos-vncserver frontend with autostart option
- Package hyperiond into Piccap directly
- Quick Screenshot (expose HTTP port that just returns PNG of current screen contents)
- Custom IR remote codes editor/updater/blaster
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
cmd="defaults read"; left=$(eval $cmd); while true; do right=$(eval $cmd); diff <( printf '%s' "$left") <( printf '%s' "$right"); left="$right"; sleep 1; done |
NewerOlder