This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global user.name ridomin | |
| git config --global user.email ridomin@live.com | |
| git config --global alias.co checkout | |
| git config --global alias.st status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM node:10.16.0-alpine | |
| WORKDIR /usr/app | |
| COPY ./package.json ./ | |
| RUN npm install --quiet | |
| COPY . . | |
| RUN npm run build | |
| EXPOSE 3001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "globals" : | |
| { | |
| "alwaysShowTabs" : true, | |
| "copyOnSelect" : false, | |
| "defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
| "initialCols" : 120, | |
| "initialRows" : 30, | |
| "keybindings" : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as msRest from '@azure/ms-rest-js' | |
| import {IoTHubTokenCredentials} from './iothub_token_credentials' | |
| export type DigitalTwinGetResponse = { | |
| body: any; | |
| _response: msRest.HttpResponse & { | |
| bodyAsText: string; | |
| parsedBody: any; | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const iothub = require('azure-iothub') | |
| const registry = iothub.Registry.fromConnectionString(process.env.IOTHUB_CONNECTION_STRING) | |
| const device = {deviceId: 'ppr-bb-' + new Date().getTime(), status: 'enabled'} | |
| registry.create(device, (err) => { | |
| if (err) throw(err) | |
| console.log(`Device ${device.deviceId} created`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "SecurityLayer" -value 0 | |
| Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -value 0 | |
| Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "fAllowSecProtocolNegotiation" -value 0 | |
| Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -Value 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var wsUri = "ws://127.0.0.1:8999"; | |
| ws = new WebSocket(wsUri); | |
| ws.onopen = (e) => console.log(e) | |
| ws.onmessage = (e) => console.log(e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.Logging; | |
| using System; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace TemperatureController2 | |
| { | |
| class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sleep = (delay) => new Promise(resolve => setTimeout(resolve, delay)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param {string} id - element id | |
| * @returns {HTMLElement} | |
| */ | |
| const gbid = (id) => { | |
| const el = document.getElementById(id) | |
| if (el === null) { | |
| throw new Error('element not found: ' + id) | |
| } | |
| return el |