layout: page title: "Azure IoT" description: "Offers support for Azure IoT integration with Homeassistant." date: 2017-10-22 14:18 sidebar: true comments: false sharing: true footer: true logo: home-assistant.png
This file contains 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 context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var actions = web.get_userCustomActions(); | |
context.load(web) | |
context.load(actions) | |
context.executeQueryAsync( | |
function () { | |
var newAction = actions.add(); |
This file contains 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 context = SP.ClientContext.get_current(); | |
var web = context.get_web(); | |
var currentList = web.get_lists().getById(_spPageContextInfo.pageListId); | |
var currentListItem = currentList.getItemById(_spPageContextInfo.pageItemId); | |
context.load(currentListItem); | |
context.executeQueryAsync( | |
function(){ | |
console.log('Success') | |
console.log(currentListItem) | |
console.log(currentListItem.get_item('PropertyName')) |
This file contains 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
SpoOperation op = _tenant.CreateSite(_newsite); | |
ctx.Load(_tenant); | |
ctx.Load(op, i => i.IsComplete); | |
try { | |
ctx.ExecuteQuery(); | |
} | |
catch (ServerException se) | |
{ | |
if(se.ServerErrorCode != -2146233083) |
This file contains 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 a diff file | |
$d = Import-Clixml .\diff2016-05-20.xml | |
## Write some Html stuff | |
$d | ?{$_.SideIndicator -eq "=>"} | % { | |
Write-Host "<li><b>$($_.outerText):</b> </li>" | |
} |
This file contains 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'; | |
import { HttpClient, HttpClientResponse } from '@microsoft/sp-http'; | |
import { IWebPartContext } from '@microsoft/sp-webpart-base'; | |
export interface IListsService { | |
getListNames(): Promise<string[]>; | |
getListColumns(listName: string): Promise<string[]>; | |
getListItems(listName: string, listColumns: string[]): Promise<string[][]> |
This file contains 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
{ | |
"entries": [ | |
{ | |
"entry": "./lib/webparts/manual/manual.js", | |
"manifest": "./src/webparts/manual/manual.manifest.json", | |
"outputPath": "./dist/manual.bundle.js" | |
} | |
], | |
"externals": { | |
"@microsoft/sp-client-base": "node_modules/@microsoft/sp-client-base/dist/sp-client-base.js", |
This file contains 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
# For more information see: http://askwictor.com/2jxcYDT | |
# Store the credentials in a variable | |
$creds = Get-Credential | |
# Connect to the Microsoft Online services | |
Connect-MsolService -Credential $creds | |
# Get tenant setting (misspelled) | |
Get-MsolCompanyInformation | Format-List UsersPermissionToCreateGroupsEnabled |
This file contains 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
private static extractTextFromMessage(message: builder.IMessage): string { | |
var s = (message.text) ? message.text : ''; | |
if (message.entities) { | |
message.entities.forEach((ent: any) => { | |
s = s.replace(ent.text, ''); | |
}) | |
} | |
return s.trim(); | |
} |
This file contains 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
## https://support.microsoft.com/en-us/help/971058/how-do-i-reset-windows-update-components | |
cleanmgr /sageset | |
cleanmgr /sagerun | |
$path = "c:\windows\SoftwareDistribution" | |