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
-- Source: https://github.com/AmrEldib/cmder-powerline-prompt | |
--- promptValue is whether the displayed prompt is the full path or only the folder name | |
-- Use: | |
-- "full" for full path like C:\Windows\System32 | |
local promptValueFull = "full" | |
-- "folder" for folder name only like System32 | |
local promptValueFolder = "folder" | |
-- default is promptValueFull | |
local promptValue = promptValueFull |
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" | |
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
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
# 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
{ | |
"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
## 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
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
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
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(); |