Skip to content

Instantly share code, notes, and snippets.

# Install dependencies
$ yarn
# Run the application
$ node src/app.js
# Or, if you are using a remote session:
$ DISPLAY=":0" node src/app.js
@makvoid
makvoid / chromium-browser-flags.csv
Created June 16, 2022 02:26
Chromium browser flags
Flag Description
--kiosk Removes all toolbars and menus and restricts most actions. Forces a full-screen appearance.
--disable-notifications Stops websites from asking for permission for certain things like notifications.
--enable-automation Removes the info-bar from the tops of pages warning that Chrome is being controlled remotely.
--noerrdialogs Suppresses error dialogs if encountered.
--crash-on-hang-threads Forces an exit if the UI or IO thread hangs.
$ node scripts/package_and_upload_custom_functions.js
Found a total of 3458 files to add to the archive.
Deploying project to HarperDB, please wait...
Deployment finished - Successfully deployed project: api
@makvoid
makvoid / hdb-sign-guide-deploy-script-customization.js
Created June 16, 2022 02:23
Deployment script customization
// Required configuration
const HDB_INSTANCE_NAME = 'signs'
const HDB_ACCOUNT = 'makvoid'
const HDB_USERNAME = 'signs_admin'
const HDB_PASSWORD = '...'
const HDB_PROJECT_NAME = 'api'
@makvoid
makvoid / hdb-sign-guide-editing-environment-files.js
Created June 16, 2022 02:22
Editing the API URL in the Frontend
export const environment = {
apiUrl: 'https://functions-signs-makvoid.harperdbcloud.com/api/',
...
@makvoid
makvoid / hdb-sign-guide-cloning-the-project.sh
Last active June 16, 2022 02:32
Git clone command for cloning the project
$ git clone https://github.com/makvoid/guide-harperdb-digital-signage.git
@makvoid
makvoid / esp32_32s_ahtx0_test.py
Created May 17, 2022 02:31
ESP-C3-32S AHTX0 test
import adafruit_ahtx0
from adafruit_datetime import datetime
from adafruit_requests import Session
import board
from busio import I2C
from digitalio import DigitalInOut, Direction
from socketpool import SocketPool
from ssl import create_default_context
from time import monotonic, sleep
from wifi import radio
@makvoid
makvoid / d1-mini-esp8266-blink.py
Created May 9, 2022 02:23
D1 Mini ESP8266 blink example
@makvoid
makvoid / esp32_32s_blink.py
Created May 9, 2022 02:22
ESP-C3-32S blink example
@makvoid
makvoid / struct_formats.py
Last active March 27, 2022 00:58
Struct formats for the Forza data packets
# Sled / Default format (FM7)
default_format = '<iI27f4i20f5i'
# Dash format (FM7)
dash_format = default_format + '17fH6B3b'
# Horizon format (FH4+)
horizon_format = default_format + 'i19fH6B4b'