Skip to content

Instantly share code, notes, and snippets.

View johndoewashere2's full-sized avatar

johndoewashere2

View GitHub Profile
@mbentley
mbentley / omada_api.ps1
Last active August 9, 2024 13:55
Example API Calls Using Powershell and Bash/curl for Omada Controller (last validated on 5.12.7)
### PowerShell Example
# set variables
$OMADA_URL = "https://omada.example.com:8043"
$USERNAME = "admin"
$PASSWORD = "test12345"
# get controller id from the API
$CONTROLLER_ID = (Invoke-RestMethod -Uri "${OMADA_URL}/api/info" -Method Get -UseBasicParsing).result.omadacId
# set the login request body as json
@themactep
themactep / dusk2dawn.sh
Last active June 13, 2024 08:59
Generate cron job lines from sunrise and sunset time provided by api.sunrise-sunset.org
#!/bin/sh
# Set cron jobs by actual sunset and sunrise time
# 2023 Paul Philippov <[email protected]>
# 2023-12-23 - initial script
# 2023-04-28 - use daynight script to switch day mode
# 2024-06-12 - add timezone support
# Please tip the API provider: https://www.buymeacoffee.com/sunrisesunsetapi
# Geographic coordinates of your place
lat="42.17509000"
@wltechblog
wltechblog / factory_install.sh
Last active August 22, 2024 16:32
SD card firmware flash for Wuuk Y0510
#!/bin/sh
# WUUK Y0510 https://amzn.to/4dFlKv1
#
# Instructions
#
# Note: If we increase uboot beyond 256k this needs to be adjusted.
# Build thingino firmware, up to make pack_full, or grab full firmware file from github releases
# -- UPDATE --
# There are now 2 versions of this camera. Most use the sc4336p sensor, a few have the sc401ai sensor.