Welcome on Martin CodeZhttps://codez.deedx.cz/
Recent content in Welcome on Martin CodeZHugo -- gohugo.ioen-usTue, 17 Oct 2017 18:03:08 +0100OpenVPN tunnel with Microsoft Azurehttps://codez.deedx.cz/posts/openvpn-tunnel-with-azure/
Tue, 16 Apr 2019 18:00:00 +0200https://codez.deedx.cz/posts/openvpn-tunnel-with-azure/I&rsquo;m sure you know the feeling. At the airport, connecting to their free Wi-Fi, no password, zero encryption, hoping it&rsquo;s not just some pineapple, sniffing your packets. And even though most of the communication done over the internet these days is encrypted, it still doesn&rsquo;t feel right.
How about wireless networks at hotels? Need to get some work done, but ouch, RDP is blocked&hellip; Only HTTP/HTTPS for you this time.ChoicePrompt with buttons in Teamshttps://codez.deedx.cz/posts/choiceprompt-with-buttons-in-teams/
Mon, 01 Apr 2019 14:21:00 +0200https://codez.deedx.cz/posts/choiceprompt-with-buttons-in-teams/Microsoft&rsquo;s Bot Framework SDK in it&rsquo;s latest iteration (v4) continues with the tradition of providing developers with useful pre-made dialogs which handle most common user inputs (Date, Choice, Text&hellip;). While the framework tries to present dialogs in the best possible way for given channel, sometimes it just doesn&rsquo;t. In this case the issue is with ChoicePrompt&rsquo;s fallback to text options in Microsoft Teams channel.
When you use ChoicePrompt as described in samples and docs in the Web Chat or Facebook Messenger, you will get nice buttons that disappear when clicked.Cheat Sheet: PowerShellhttps://codez.deedx.cz/cheats/cheat-sheet-powershell/
Wed, 06 Mar 2019 22:08:42 +0100https://codez.deedx.cz/cheats/cheat-sheet-powershell/ A few snippets of PowerShell I&rsquo;ve found useful over and over again. Most of them are just syntax/functions that I&rsquo;m unable to remember, some of them might be more complex.
It’s a living document, I keep updating it.
XML parsing $xmlDoc = [XML](Get-Content $filePath) $xmlDoc.Element.Subelement.setAttribute(&quot;Attr&quot;, $value); $xmlDoc.Save($filePath) JSON parsing $jsonDoc = Get-Content $filePath | Out-String | ConvertFrom-Json Interactive C# on Linuxhttps://codez.deedx.cz/posts/interactive-csharp-on-linux/
Wed, 06 Feb 2019 14:40:53 +0100https://codez.deedx.cz/posts/interactive-csharp-on-linux/C# interactive is a handy tool inside Visual Studio (powered by Roslyn), which allows you to experiment with blocks of C# code without the need to load up whole new solution. This post is about dotnet-script, a global dotnet CLI tool, which works everywhere where .NET Core runs and provides the same functionality as C# interactive.
Why? If you do cross-platform development with .NET Core (which is perfecly feasible and you should totally do it), you might get into situations where you need to test how the framework behaves on different platforms.Cheat Sheet: C#, .NET Corehttps://codez.deedx.cz/cheats/cheat-sheet-csharp/
Tue, 05 Feb 2019 22:56:53 +0100https://codez.deedx.cz/cheats/cheat-sheet-csharp/I often find myself searching the internet for the same four lines of C# all over again, because of my inability to remember anything and the complexity of my filesystem structure&hellip; That&rsquo;s why I decided to start putting together quick snippets of Frequently Used Code (FUC).
This one is about ASP.NET Core.
It&rsquo;s a living document, I keep updating it.
.NET Core CLI - change UI language to English set DOTNET_CLI_UI_LANGUAGE=en Merge array of strings into a single string So simple that I&rsquo;m ahsamed that I&rsquo;m searching for it all over again&hellip;Parsing SoundCloud RSS with .NEThttps://codez.deedx.cz/posts/parsing-soundcloud-rss-with-net/
Tue, 15 Jan 2019 14:49:11 +0100https://codez.deedx.cz/posts/parsing-soundcloud-rss-with-net/If you&rsquo;re into podcasting, you&rsquo;ve probably noticed that RSS is still alive! Podcasts are not downloaded directly from Apple Podcasts, Spotify, Google Play Music etc., these directories just aggregate your RSS feed, display information to listeners and redirect them to your audio file for listening/download.
What is this about? This post describes the process of extracting information from SoundCloud RSS feed in C# to generate static website.
Background My goal was to create a static website (no WordPress or other CRM) and avoid duplication of data input.Continuous speech to text on the server with Cognitive Serviceshttps://codez.deedx.cz/posts/continuous-speech-to-text/
Fri, 04 Jan 2019 15:00:00 +0200https://codez.deedx.cz/posts/continuous-speech-to-text/Navigating current Microsoft&rsquo;s offering of speech to text (S2T) services can get quite confusing. There are several services, which seemingly do the same, and twice as much SDKs. Fortunately, Cognitive Services team introduced the new Speech service, which covers traditional Bing Speech API, Custom Speech and Speech Translator under one umbrella.
[This post was massively updated in January 2019 to reflect significant improvements in the service which happened by the end of 2018.Formatting TimeSpan in PowerShellhttps://codez.deedx.cz/posts/format-timespan-powershell/
Tue, 04 Dec 2018 13:43:00 +0100https://codez.deedx.cz/posts/format-timespan-powershell/TimeSpan is a structure which represents a time interval. Working with TimeSpans in PowerShell can be similar to .NET, or can be made a little easier by using native PowerShell functionality.
In my scenario, I needed to parse a certain point in time, defined by milliseconds, and then output this TimeSpan in a very strict form:
00:00:00.000 # hours:minutes:seconds.milliseconds (3 numbers) How to achieve this goal in PowerShell? Let&rsquo;s explore&hellip; (or jump to solution).Azure Pipelines as build system for GitHubhttps://codez.deedx.cz/posts/azure-pipelines-as-build-for-github/
Tue, 06 Nov 2018 13:22:00 +0100https://codez.deedx.cz/posts/azure-pipelines-as-build-for-github/While it is possible to create public repositories for free with Azure DevOps (recently renamed from Visual Studio Team Services), it&rsquo;s still true that GitHub is the developer&rsquo;s social network. I personally prefer GitHub for public, community driven and open-source work, and Azure DevOps for private projects.
This article is about setting up the build and release pipeline for GitHub using Azure DevOps.
Outline:
Background Build Building .Bot to web communication with Azure Bot Servicehttps://codez.deedx.cz/posts/bot-web-communication/
Mon, 29 Oct 2018 16:21:14 +0200https://codez.deedx.cz/posts/bot-web-communication/I really like the open-source Web Chat component for Microsoft Bot Framework / Bot Service. I&rsquo;ve seen developers doing magical things with it - completely changing the look and feel, adding people&rsquo;s icons, embedding HTML forms, redesigning buttons and the interface overall etc.
In this article I want to make note of a powerful, yet often overlooked, feature called &ldquo;back channel&rdquo;. By using back channel you are able to communicate from your bot with the website it&rsquo;s hosted on.Event Grid trigger for Azure Functions with PowerShellhttps://codez.deedx.cz/posts/event-grid-deployment-with-azure-cli/
Wed, 22 Aug 2018 13:11:25 +0200https://codez.deedx.cz/posts/event-grid-deployment-with-azure-cli/I wanted to trigger Azure Function by an event sent to Event Grid, which is an easy and well documented task. It&rsquo;s getting more difficult when you don&rsquo;t use Azure Portal and want to set everything up using command line.
There are certain combinations of services which make automated deployment not as simple as JSON template. One of them is Bot Service with Azure Active Directory (post coming soon), but in this article I&rsquo;m going to look into Event Grid + Azure Functions combo.Cheat Sheet: Azure SDKshttps://codez.deedx.cz/cheats/cheat-sheet-azure-sdks/
Tue, 21 Aug 2018 16:21:32 +0200https://codez.deedx.cz/cheats/cheat-sheet-azure-sdks/I often find myself searching the internet for the same four lines of C# all over again, because of my inability to remember anything and the complexity of my filesystem structure&hellip; That&rsquo;s why I decided to start putting together quick snippets of frequently used code (FUC).
This one is about various Azure SDKs I work with.
It&rsquo;s a living document, I&rsquo;ve been updating it over time.
Storage Tables There&rsquo;s new NuGet library for working with Storage Tables - coming from the effort to unify traditional Tables and Cosmos DB Table API.Extending chatbot platform with Microsoft Azurehttps://codez.deedx.cz/projects/extending-chatbot-platform-with-azure/
Tue, 31 Jul 2018 11:00:00 +0200https://codez.deedx.cz/projects/extending-chatbot-platform-with-azure/Together with Wingbot.ai and Česká spořitelna we have extended existing chatbot framework with support for Microsoft Azure Bot Service and deployment to Microsoft Azure.
Motivation There are many chatbot frameworks out there. And although Microsoft&rsquo;s Bot Builder SDK is the recommended way of working with Azure Bot Service, not everyone is able (or keen) to use it. In our case the customer has picked Wingbot.ai as their bot building platform and it was up to some engineering magic to add Azure support to it.Cheat Sheet: Githttps://codez.deedx.cz/cheats/cheat-sheet-git/
Mon, 30 Jul 2018 10:49:00 +0200https://codez.deedx.cz/cheats/cheat-sheet-git/Visual Studio (both Code and 2017) has a nice set of tools to work with Git, but when it comes to more complex source control magic, I still prefer to roll my sleeves up and dive into the console. Here is my cheat sheet with commands that are not used that often, but come handy from time to time.
I started this cheat sheet based on a great article written by Michael Kohl.Cheat Sheet: ASP.NET Corehttps://codez.deedx.cz/cheats/cheat-sheet-aspnet-core/
Mon, 02 Jul 2018 21:40:42 +0200https://codez.deedx.cz/cheats/cheat-sheet-aspnet-core/I often find myself searching the internet for the same four lines of C# all over again, because of my inability to remember anything and the complexity of my filesystem structure&hellip; That&rsquo;s why I decided to start putting together quick snippets of Frequently Used Code (FUC).
This one is about ASP.NET Core.
It&rsquo;s a living document, I keep updating it.
Enable CORS on REST API Startup.cs -&gt; ConfigureServices():
services.AddCors(); Startup.C# async Main()https://codez.deedx.cz/posts/csharp-async-main/
Thu, 21 Jun 2018 14:20:59 +0200https://codez.deedx.cz/posts/csharp-async-main/C# 7.1 extended valid signatures for the static Main() method to allow the async keyword. Valid starting points of .NET applications are now:
public static void Main(); public static int Main(); public static void Main(string[] args); public static int Main(string[] args); public static Task Main(); public static Task&lt;int&gt; Main(); public static Task Main(string[] args); public static Task&lt;int&gt; Main(string[] args); Thanks to the Task return type, it&rsquo;s now possible to use async/await with Main.Building AI-powered retail storehttps://codez.deedx.cz/talks/building-ai-powered-store/
Wed, 20 Jun 2018 14:06:17 +0200https://codez.deedx.cz/talks/building-ai-powered-store/We were happy to host Prague Data Management Meetup at Microsoft on Tuesday and offered attendees a showcase of our comprehensive retail demo which runs in our Prague office.
Second part of the meeting was a presentation about the technology we have used to build first generation of this demo (last year, for the DOTS conference). Here are all slides from the talk, along with links:
https://microsoft.github.io/techcasestudies/cognitive%20services/2017/08/04/BlackRadley.html
https://microsoft.github.io/techcasestudies/iot/2016/12/23/BlueDynamic.html
https://www.microsoft.com/en-us/trustcenter/cloudservices/cognitiveservices
https://docs.microsoft.com/en-us/microsoft-365/compliance/gdpr-dpia-azureWUG Days 2018https://codez.deedx.cz/talks/wug-days-2018/
Sun, 08 Apr 2018 16:08:07 +0200https://codez.deedx.cz/talks/wug-days-2018/The presentation was built as a list of practical recommendations and showcase of the &ldquo;coolness&rdquo; of Azure Functions, particularly in C#. First delivery at WUG Days 2018 in Brno.
Here are the slides as PNGs, along with hyperlinks (where relevant):
https://codez.deedx.cz/posts/from-iot-hub-to-sms/
https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
https://codez.deedx.cz/projects/high-throughput-azure-functions-on-http/
https://codez.deedx.cz/projects/high-throughput-azure-functions-on-http/
https://blogs.msdn.microsoft.com/appserviceteam/2017/09/19/processing-100000-events-per-second-on-azure-functions/
https://itnext.io/building-single-page-app-with-azure-functions-and-improving-cold-start-time-79a0faec9913
https://github.com/Azure/app-service-announcements/issues/84
https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json
https://docs.microsoft.com/en-us/azure/azure-functions/High throughput Azure Functions on HTTPhttps://codez.deedx.cz/projects/high-throughput-azure-functions-on-http/
Mon, 05 Mar 2018 13:34:56 +0100https://codez.deedx.cz/projects/high-throughput-azure-functions-on-http/Is the Azure Functions service able to achieve 1000 HTTP request per second without degradation in latency and reliability? Of course it is, that&rsquo;s what this article is about! Read on to learn more about considerations, fine-tuning and monitoring of a high-scale HTTP scenario.
For those not familiar with Azure Functions - it&rsquo;s an application hosting service from the Microsoft Azure serverless family. You provide code, Functions take care of triggering it, scaling the infrastructure and management.How to run load test from Visual Studio on a custom VSTS righttps://codez.deedx.cz/posts/how-to-run-load-test-from-visual-studio-on-custom-vsts-rig/
Wed, 28 Feb 2018 17:26:27 +0100https://codez.deedx.cz/posts/how-to-run-load-test-from-visual-studio-on-custom-vsts-rig/I was doing some load tests recently and while Visual Studio Team Services (VSTS) has a reasonable UI and provides with some free load testing minutes, I eventually needed to spin up my custom load testing rig in Azure. The classical approach with Test Controller and Test Agents would work fine, but it adds a layer of complexity and management which has already been solved by VSTS.
Introduction There are several ways to run load test with the assistance of VSTS:WordCamp 2018https://codez.deedx.cz/talks/wordcamp-2018/
Fri, 23 Feb 2018 11:00:00 +0100https://codez.deedx.cz/talks/wordcamp-2018/Slides Slides can be downloaded from my OneDrive.
Links https://devlog.deedx.cz/windows-mobile-6-5/ https://blogs.msdn.microsoft.com/vyvojari/ https://www.visualstudio.com/dev-essentials/ https://azure.microsoft.com/en-us/free/ Demos Fast start:
WordPress deployment template in Azure Marketplace. Automatically creates hosted MySQL database. Allows changing the PHP version and other hosting properties quickly. Docker for development:
Docker for Windows in Azure virtual machine with Windows Server 2016. docker-compose.yml -&gt; deploy mysql &amp; wordpress:latest container. Changes happen in the html folder and immediately show up on the site.From IoT Hub to Power BI (without Stream Analytics)https://codez.deedx.cz/posts/from-iot-hub-to-powerbi/
Mon, 12 Feb 2018 21:22:36 +0100https://codez.deedx.cz/posts/from-iot-hub-to-powerbi/This post is a loose follow-up to the From IoT Hub to SMS article I posted on December. Let&rsquo;s start with a question: &ldquo;Do we need Stream Analytics do get data from IoT Hub to Power BI?&rdquo; The answer is as usual: &ldquo;sometimes you do, sometimes you don&rsquo;t&hellip;&ldquo;
For those not familiar, the traditional approach to IoT in Microsoft Azure is to connect the IoT device to IoT Hub, then let data flow through Stream Analytics and finally dump it anywhere you want to use it (SQL Database, CosmosDB, PowerBI etc.From IoT Hub to SMShttps://codez.deedx.cz/posts/from-iot-hub-to-sms/
Mon, 04 Dec 2017 23:46:39 +0100https://codez.deedx.cz/posts/from-iot-hub-to-sms/Let&rsquo;s imagine you&rsquo;re a manufacturer, running hundreds of machines in your factory. Each of those machines has three buttons attached to it. Pressing any of them sends a message to Azure which then makes sure that if the button means &ldquo;alert, something is wrong!&rdquo; a responsible operator/serviceman/manager gets a text message to their phone.
Architecture To achieve this, we are going to combine Azure IoT Hub, Azure Functions and Twilio.Signal Faceshttps://codez.deedx.cz/projects/signal-faces/
Thu, 30 Nov 2017 17:14:05 +0100https://codez.deedx.cz/projects/signal-faces/&ldquo;How could your computer vision technology work as part of an art installation?&rdquo;
When our friends from the Studio of Intermedia Work at the Academy of Fine Arts in Prague came to us with this question, we immediately took on the challenge. Under the creative lead of students and together with guys from Biceps Digital agency, we have built an art installation for Prague Signal Festival 2017.
SIGNAL Festival is the largest cultural event in the Czech Republic, whose unique integration of art, city space, and modern technology has drawn over 1.DevTest & DevOps in the Cloud - Prague, 2017https://codez.deedx.cz/talks/devtest-devops-prague-2017/
Tue, 14 Nov 2017 23:34:46 +0100https://codez.deedx.cz/talks/devtest-devops-prague-2017/During my talk in Prague on November 15th 2017 I show the following examples of Azure Management using the command line tools (CLI), Azure Resource Manager (ARM) and PowerShell (PS).
Azure CLI Install Azure CLI. I used Bash for Ubuntu on Windows:
echo &quot;deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main&quot; | \ sudo tee /etc/apt/sources.list.d/azure-cli.list sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 sudo apt-get install apt-transport-https sudo apt-get update &amp;&amp; sudo apt-get install azure-cli Try az to check that it works properly.Desktop Chatbothttps://codez.deedx.cz/projects/desktop-chatbot/
Fri, 10 Nov 2017 10:28:48 +0200https://codez.deedx.cz/projects/desktop-chatbot/Together with IT department and developers from the General University Hospital in Prague (VFN in short) we have built an internal chatbot for employees to search through their organization. When finalizing this solution we found it difficult to host the chatbot on an internal SharePoint site and decided to extend the solution with a desktop application.
This article describes the process of creating a desktop hosting application, which can host any chatbot built using Microsoft&rsquo;s Bot Framework.Adding Telemetry to a Bothttps://codez.deedx.cz/posts/adding-telemetry-to-a-bot/
Wed, 01 Nov 2017 15:26:20 +0100https://codez.deedx.cz/posts/adding-telemetry-to-a-bot/Building a chatbot is fun. Running it in production can be even more entertaining, but the golden rule always stays the same - no chatbot ever survives first encounter with real user. That&rsquo;s why it&rsquo;s necessary to track, monitor and adjust the conversation flow as your users enter their first questions and don&rsquo;t understand their first answers&hellip;
Imagine a conversation like this:
[Bot] Is there something I can help you with?OpenSlava 2017https://codez.deedx.cz/talks/openslava-2017/
Wed, 25 Oct 2017 10:28:48 +0200https://codez.deedx.cz/talks/openslava-2017/Last month I conducted a workshop and then gave a talk at the OpenSlava 2017 conference in Bratislava. Both were focused on Microsoft&rsquo;s Cognitive Services and here are the links:
Workshop: Image Recognition with .NET Core on Github How This Site Is Built - Continuouslyhttps://codez.deedx.cz/posts/how-is-it-built-continuously/
Sat, 02 Sep 2017 11:32:31 +0200https://codez.deedx.cz/posts/how-is-it-built-continuously/Historically, I&rsquo;ve been the PHP kind of blogger. I basically learned the programming language by coding a sophisticated guestbook component for my various websites. Dynamic blog engine followed (and is still running!), but then I finally realized that it&rsquo;s not the right time to write yet another MVC-CMS system and switched to WordPress. It works just fine, we use it at Microsoft and also my Czech dev-blog is powered by WordPress.Abouthttps://codez.deedx.cz/about/
Tue, 27 Jun 2017 12:08:41 +0200https://codez.deedx.cz/about/Welcome! This is a technical blog written by Martin Šimeček, in a language which isn&rsquo;t his native - English.
Based in Prague, Czech Republic, I currently work for Microsoft as part of a global team with the ultimate goal of helping developers around the planet to achieve more. My work doesn&rsquo;t end with handing the source code over and going to production, because I ship when I share. Most of the projects I work on end on GitHub as open-source.