Skip to content

Instantly share code, notes, and snippets.

@eliazonta
eliazonta / cuda_install.md
Last active May 25, 2024 20:27 — forked from denguir/cuda_install.md
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 23.10

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@docPhil99
docPhil99 / controlling_ha.md
Last active March 7, 2023 17:12
Controlling Home Assistant remotely via curl

It's actually fairly easy to control Home Assistant remotely using curl but I couldn't find a complete solution on how to do this, so here goes...

  1. Activate the api in configuration.yaml by adding the line api:
  2. Get an Authorization token from HA (It's a Long-Lived Access Tokens which can be created on your HA user profile page)
  3. This list of exposed states can be found using curl -X GET -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" http://YOUR_IP:8123/api/states | prettyjson
  • Note prettyjson is an alias for python -m json.tool, you don't need this it's just easier to read.
  1. To get the state of a device append the entity.id to the URL, eg curl -X GET -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" http://YOUR_IP:8123/api/states/switch.mylight | prettyjson
  2. The API documentation shows you how to change the states but this does not actually turn on the lights, etc. Instead, us