Przejdź do głównej zawartości


Connect to Azure from command line on Windows

When working with Azure we could go two ways:
1) using Azure portal and work in UI from your web browser
2) Connect to Azure from command line and run commands by typing in text in CMD.

I already wrote about option 1 but today I'll show you how to start with option 2 which is Command line.

First we need to download MSI installer from Microsoft website

After sucessfull instalation you're ready to test az command.
Open CMD and type in 'az'

Now let's log in with your Azure credentials. Just type in "az login" in cmd.
You should be redirected from command line to web browser and prompted for username and account in web browser.
When you confirm your identity you'll be presented the screen like this in command line:

Najnowsze posty

Monitof your app with Live Metrics Stream on Azure

Today I'll show you a Live Metrics Stram, which is the Azure function that helps you monitor your services on the go.

Before you have working application with Application Insights Nuget package insialled, You need to go to Azure Portal and create new Application Insights:

Then click Create button:

Then fill the form and specify the application name and type, a valid subscription, resource group and the region.
Once you fill the form, click Create.
Wait a few seconds for Azure to deploy the newly created Application Insights.

Then go to Dashboard and search for your insights:

When you have your application insights running and configured app, then you can go to web brower and request your page 5 times. After that your live metrics could looke something like this:

Azure portal says this about Applications Insights:
It's available if you install version 2.2.0 (or later) of the Application Insights SDK for ASP.NET in your app.
If you work on older versions of packahe in the applic…

Running Microsoft SQL Server on Linux with Docker

Probably you heard that Microsoft Sql Server can only run on Windows machines. Good news - This is not true anymore. You can easily install it on Linux machine too.
In this article I show you 2 ways of installing Sql Server on Ubuntu 16 and demonstrate how to connect to the database from remote machine.

OPTION 1: Slow way - Manual installation
This is the most straightforward way of installing. You download packages and configure Sql Server interactively(you set password, port and choosing installation option - free or paid).
This is the step by step instruction from microsoft

OPTION 2: Fast way - Running on docker with just 2 pure-command-line commands.
My assumption is that your Ubuntu machine has already docker installed.
You can check if Docker is already installed by tunning the command: docker.
If you don't have docker installed, no problem: before continuing below instruction just install docker. T…

MongoDB for C# developers - Lesson 1

Today I'll show you what I lerned at Mongo University online course for C# developers after first lesson and passing all homework.
I'll show you how you can:
- install MongoDB on Windows workstation
- switch between databases
- display all elements from a collection
- add new document to a collection
- restore Mongo database from a dump folder.

Get MongoDB installer from MongoDB download center:

After installation of 64 bit version go to C:\Program Files\MongoDB\Server\3.4\bin.
You should see there 2 files:
-mongo - this is a console application, you can think of it as a client application
-mongod - this is a server of database

At this point it's useful to add 'C:\Program Files\MongoDB\Server\3.4\bin' to PATH environment variable.

Now open the command line and go to C drive.
Create the folder by using command:
mkdir data\db
And now run the server:
Important: If you forget adding the data\db folder then server will stop ju…

Up and running with Laravel

Today I'll show you how to start working with Laravel - a modern PHP framework.

After reading this article you'll be able to:
- Install XAMPP
- Configure Virtual Hosts on Apache
- Create your first application in Laravel
- Run the application
- Start coding

As a first step I encourage you to visit to get some background knowledge about Laravel.

Laravel is a PHP framework which is build on top of the MVC pattern (MVC stands for Model View Controller).
You can find general explanation of MVC design pattern with some code examples written in Java here.

I assume that you've already installed XAMPP which has version for Linux, Windows and OS X.
Personally I'm using Windows in this tutorial but on each operating system it should work similarly.
You can get the installer of XAMPP from this page:
When installer prompts you which options you want to install, you need to select Apache and you are free to skip the rest opti…

Learning API

Today I'll show you how to use API in order to create virtual server in the cloud directly from your code.
We're going write a script in PHP language and use Amazon SDK API to connect with, which is the biggest and most modern hosting provider in Poland.

First we need to install Amazon SDK

One important note:
We can use the latest version of amazon SDK but we also need to do one trick.
We'll use signatureV2 instead ov Signaturev4 as e24cloud doesn't support SitnatureV4 yet. You can download it here:

We need to download SDK and the bridge which allows us to use Signaturev2 to the same folder, so that require instruction work seamlessly in the form that I provided in the example below.

Then go to your admin panel in to find two values: a key and a secret. In the following code you need to paste those 2 values. I used 2…

Xamarin.Forms Previewer

Today I'll show you a tool for every Xamarin developer - Xamarin.Forms Previewer - a tool which will help you to design Xamarin.Forms views faster.

First we need a xaml view:

The view can't be easier. It contains only one label.
Now let's build the project and open Previewer from the View Menu:

It should results in displaying the new window which renders your xaml view:

Now the most interesting part. Let's add a few labels and change the screen background color. There is no need to save, the design will be changed on the previewer instantly.

This is a Xamarin.Forms previewer. I'm using it because it speeds up my view desting loop. I don't need to run the app on emulator or a device to see effects of my changes.