Skip to content

Instantly share code, notes, and snippets.

Test 1

a = object()
@digimaun
digimaun / index.json
Last active February 10, 2024 01:40
test_index
{
"formatVersion": "1",
"lastUpdatedUtc": "2024-02-10T00:52:51",
"iotOperations": {
"version": "0.3.0-preview",
"infoLink": "https://learn.microsoft.com/en-us/azure/iot-operations/",
"commandLine": {
"latestCompat": {
"version": "0.3.0b3",
"releaseUtc": "2024-02-07T00:00:00",
@digimaun
digimaun / adu_cli_preview.md
Last active May 27, 2022 18:41
Preview ADU CLI usage docs

ADU CLI preview instructions

Install and versioning

  • Download the preview IoT extension .whl package from the indicated location.
  • Note the version on the file name. 255.200.1, this is temporary semver while the package has not been widely distributed. New versions will increment the patch version i.e. 255.200.1 -> 255.200.2.
  • If you do not have it yet, or have an old version, install Azure CLI with these instructions https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
    • This IoT extension requires az cli 2.30.0 or higher.
  • After az cli install/update, install the extension via az extension add --source <path to .whl downloaded earlier> -y. If you have a 'mainline' release version of azure-iot installed, first uninstall via az extension remove --name azure-iot then run the install command against the preview package.
  • After the extension installs, the root ADU command group az iot device-update should be available and ready for use.
echo "Running dmr-client install script."
source_archive_tmp=$(mktemp -d dmr_client_tmp_XXXXXX)
curl -# -o $source_archive_tmp/tools https://codeload.github.com/Azure/iot-plugandplay-models-tools/tar.gz/0.2-preview
cd $source_archive_tmp && { tar -xf tools ; cd -; }
dotnet pack $source_archive_tmp/iot-plugandplay-models-tools-0.2-preview/resolvers/dotnet
dotnet tool install -g dmr-client --add-source $source_archive_tmp/iot-plugandplay-models-tools-0.2-preview/resolvers/dotnet/Azure.IoT.DeviceModelsRepository.CLI/bin/Debug
[[ ":$PATH:" != *":$HOME/.dotnet/tools:"* ]] && PATH=${PATH}:$HOME/.dotnet/tools
@digimaun
digimaun / branchProtectionRules.PNG
Last active October 13, 2020 22:49
iot-pnp-modelrepo-branchprotection
branchProtectionRules.PNG
@digimaun
digimaun / python_decorator_guide.md
Created June 18, 2019 03:36 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@digimaun
digimaun / iot-sdk-env-bootstrap-ubu-trusty.sh
Created October 6, 2017 23:13
Example script for installing Azure IoT SDK dependencies on Ubuntu Trusty
apt-get update && apt-get install -y libboost1.54-all-dev libcurl4-openssl-dev
@digimaun
digimaun / iot-sdk-env-bootstrap-ubu-xenial.sh
Created October 6, 2017 23:11
Example script for installing Azure IoT SDK dependencies on Ubuntu Xenial
echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" | tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ trusty-updates main universe" | tee -a /etc/apt/sources.list
apt-get update
apt-get install -y libcurl4-openssl-dev
apt-get install -y --allow-downgrades libopenmpi-dev=1.6.5-8 openmpi-bin=1.6.5-8 openmpi-common=1.6.5-8
apt-get install -y --allow-downgrades libboost1.54-all-dev
@digimaun
digimaun / index.json
Last active October 4, 2017 01:46
More data
{
"name": "azure-cli-extension-index",
"format-version": "1",
"extensions": {
"iot": {
"versions": {
"0.1.1": {
"source": "https://files.pythonhosted.org/packages/8e/69/6a10aa6be2ad1a054d874d93bd43c09aaca26a137bd0f8f961f03a249a9f/azure_cli_iot_ext-0.1.1-py2.py3-none-any.whl",
"metadata": {
"azext.minCliCoreVersion": "2.0.16",
@digimaun
digimaun / index.json
Last active October 4, 2017 00:13
With metadata
{
"name": "azure-cli-extension-index",
"format-version": "1",
"extensions": {
"iot": {
"versions": {
"1.0": {
"source": "https://files.pythonhosted.org/packages/8e/69/6a10aa6be2ad1a054d874d93bd43c09aaca26a137bd0f8f961f03a249a9f/azure_cli_iot_ext-0.1.1-py2.py3-none-any.whl",
"metadata": {
"azext.minCliCoreVersion": "2.0.16",