Skip to content

Instantly share code, notes, and snippets.

View lovelaced's full-sized avatar
🔌
plugged in

e.g. magical unicorn lovelaced

🔌
plugged in
View GitHub Profile
@lovelaced
lovelaced / ezviz_s6.md
Last active September 10, 2020 19:51
Use the EZVIZ S6 as a wifi webcam

Using the EZVIZ S6 as a wifi webcam

I bought a cheap EZVIZ S6 "action cam" and wanted to use it as a recorded and/or livestreaming PoV cam.
Ideally, it would be available as a video capture device without an sd card and also a native Linux video device.

So I did it. Here's how you can do it:

Make sure you have a working wifi card and an ethernet connection (because your wifi card will have to connect to the camera, so you need to use ethernet for internet).

Download motion

#!/bin/bash
v4l2-ctl --set-ctrl=exposure_auto=1
v4l2-ctl --set-ctrl=white_balance_temperature_auto=0
v4l2-ctl --set-ctrl=exposure_absolute=900
#v4l2-ctl --set-ctrl=contrast=26
v4l2-ctl --set-ctrl=white_balance_temperature=4900
@lovelaced
lovelaced / parachain_devops.md
Last active April 8, 2024 11:54
Best practices: administrate a Substrate-based chain

Best practices for maintaining & running substrate-based (para)chain (wip)

  • Ensure all of your systems are kept up-to-date, especially with security updates.
  • Ensure you can fully bootstrap a new system from scratch easily if needed.
  • Upload archive chain backups frequently. Potentially make these available to the community down the road.
  • Have database recovery methods in place.
  • Use infrastructure as code. Never modify anything manually on your servers.
  • Ensure you have a monitoring stack set up WITH alerts (alertmanager/grafana alerts/bots etc).
  • Keep alerts actionable, otherwise they become noise.
  • If a service crashes, make sure it automatically restarts in some way (via systemd or kubernetes).
@lovelaced
lovelaced / matrix_users_auth_provider.sh
Last active December 29, 2022 21:46
find matrix users who don't use the google auth provider
#!/bin/bash
# Print the usage of the script if the SERVER_URL or ADMIN_TOKEN arguments are not provided
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 SERVER_URL ADMIN_TOKEN"
exit 1
fi
# Get the SERVER_URL and ADMIN_TOKEN from the command line arguments
SERVER_URL="$1"