View update.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
$.ajax({ | |
url:"https://api.jsonstorage.net/v1/json/{id}", | |
type:"PUT", | |
data:'{"key_updated":"value_updated"}', | |
contentType:"application/json; charset=utf-8", | |
dataType:"json", | |
success: function(data, textStatus, jqXHR){ | |
} | |
}); |
View set.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
$.ajax({ | |
url:"https://api.jsonstorage.net/v1/json", | |
type:"POST", | |
data:'{"key":"value"}', | |
contentType:"application/json; charset=utf-8", | |
dataType:"json", | |
success: function(data, textStatus, jqXHR){ | |
} | |
}); |
View get.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
$.get("https://api.jsonstorage.net/v1/json/2ce...", | |
function(data, textStatus, jqXHR) | |
{ | |
}); |
View docker-acr.ps1
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
$registry = "%registry name here, i.e. myregistry%" | |
$repositories = docker images --digests | % { $_ -replace " +", "," } | convertfrom-csv | where { $_.REPOSITORY.StartsWith($registry) } | group REPOSITORY | |
Write-Output "Found $($repositories.Count) local repositories from $($registry) registry" | |
foreach ($group in $repositories) { | |
$repository = $group.Name.Split('/')[1] | |
$remoteData = az acr repository show-tags -n $registry --repository $repository --detail | convertfrom-json | |
foreach ($localRepo in $group.Group) { | |
$localRepo | Add-Member -NotePropertyName REPO -NotePropertyValue $repository |
View Sitecore_Windows2012R2
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
$group = [ADSI]"WinNT://./IIS_IUSRS,group" | |
$group.Add("WinNT://%DOMAIN%/%USERNAME%,user") | |
$group = [ADSI]"WinNT://./Performance Monitor Users,group" | |
$group.Add("WinNT://%DOMAIN%/%USERNAME%,user") | |
Import-Module ServerManager | |
Add-WindowsFeature Web-App-Dev | |
Add-WindowsFeature Web-Net-Ext | |
Add-WindowsFeature Web-Net-Ext45 |
View gist:5605369
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
task Init { | |
if (-not (Test-Path $localStorage)) { | |
New-Item $localStorage -type directory -Verbose | |
} | |
if (-not (Test-Path $zipFile)) { | |
Copy-Item $distributivePath $zipFile -Verbose | |
} | |
if (-not (Test-Path $localStorage\$distributiveName)) { |
View Lync.cs
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 LyncClient client; | |
// Your custom class that handles conversation events | |
private static LyncConversationManager conversation; | |
static void Main(string[] args) | |
{ | |
client = LyncClient.GetClient(); | |
conversation = new LyncConversationManager(brain, client); | |
conversation.StartListening(); |
View DirectLine.cs
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 void ImModality_InstantMessageReceived(object sender, MessageSentEventArgs e) | |
{ | |
... | |
var botConversation = directLineCLient.Conversations.NewConversationWithHttpMessagesAsync().Result.Body; | |
// Send message from Lync to Bot Framework | |
var message = new Message(); | |
message.ConversationId = botConversation.ConversationId; | |
message.Text = e.Text; | |
var result = directLineCLient.Conversations.PostMessageWithHttpMessagesAsync(botConversation.ConversationId, message).Result; |
View gist:6268578
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
<include hint="list:IncludeTemplate"> | |
<Article>{7B14FE7B-F658-4885-AAD6-7D569BAE579B}</Article> | |
</include> |
View gist:6268477
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
public class ExtendedIndexConfiguration : LuceneIndexConfiguration | |
{ | |
private bool templatesExcluded; | |
public void IncludeTemplate(string value) | |
{ | |
Assert.ArgumentNotNull(value, "value"); | |
Assert.IsTrue(ID.IsID(value), "Configuration: IncludeTemplate entry not a valid GUID. Field ID Value: " + value); | |
// First exclude all templates, if it is not yet done. |
NewerOlder