Skip to content

Instantly share code, notes, and snippets.


Alexander Doroshenko adoprog

View GitHub Profile
View update.js
contentType:"application/json; charset=utf-8",
success: function(data, textStatus, jqXHR){
View set.js
contentType:"application/json; charset=utf-8",
success: function(data, textStatus, jqXHR){
View get.js
function(data, textStatus, jqXHR)
adoprog / docker-acr.ps1
Created March 24, 2020 20:16
Compare local Docker images with the ones in Azure Container Registry (ACR)
View docker-acr.ps1
$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
adoprog / Sitecore_Windows2012R2
Created April 28, 2014 14:05
Prepare Web Server for Sitecore CMS
View Sitecore_Windows2012R2
$group = [ADSI]"WinNT://./IIS_IUSRS,group"
$group = [ADSI]"WinNT://./Performance Monitor Users,group"
Import-Module ServerManager
Add-WindowsFeature Web-App-Dev
Add-WindowsFeature Web-Net-Ext
Add-WindowsFeature Web-Net-Ext45
View gist:5605369
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)) {
adoprog / Lync.cs
Last active August 9, 2016 07:37
Lync - subscribe to IM
View Lync.cs
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);
adoprog / DirectLine.cs
Created August 9, 2016 07:29
DirectLine post message
View DirectLine.cs
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
<include hint="list:IncludeTemplate">
adoprog / gist:6268477
Created August 19, 2013 12:14
Exclude Sitecore templates from index
View gist:6268477
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.