Skip to content

Instantly share code, notes, and snippets.

💥 shakalaka

Tugberk Ugurlu tugberkugurlu

💥 shakalaka
Block or report user

Report or block tugberkugurlu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Error RZ9999: Found a malformed 'body' tag helper. Tag helpers must have a start and end tag or be self closing.
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CreateCacheEntry(String normalizedPath)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
View paket.dependencies
// NuGet packages from source
nuget NUnit ~> 2.6.3
// NuGet packages from source
nuget FAKE ~> 3.4
nuget DotNetZip >= 1.9
View Map and Array.from
const foo = new Map<string, number>();
foo.set('1key', 1);
foo.set('2key', 2);
foo.set('3key', 3);
Array.from(foo.entries()).forEach(item => {
const [y, x] = item;
console.log(`${y}zz: ${x}`)
View download-licenses.ps1
Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } | sort -property Id -unique | % {
$pkg = $_ ;
Try {
$targetFile = "C:\sqlclone-licenses\$($pkg.Id)-$($pkg.Version).txt"
(New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, $targetFile)
$lineToAppend = "License downloaded from '$($pkg.LicenseUrl)' on '$([DateTime]::UtcNow.ToString('R'))'$([Environment]::NewLine)$([Environment]::NewLine)"
Set-Content $targetFile ($lineToAppend + (get-content $targetFile))
} Catch [system.exception] {
Write-Host "Could not download license for ($pkg.Id)"
View RabbitMqQueueSubscriptionCreator.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using Foo.Messaging.Abstractions;
tugberkugurlu / Program.cs
Created Dec 14, 2016
Percentage Progress from multiple sources which runs in sequence.
View Program.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
namespace ConsoleApp7
public class MainProgressReporter : IProgress<double>
View CopyFileEx.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp6
View good.csproj
<Framework name="net451" />
<Framework name="netcoreapp1.0">
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
View dummy.fs
// getProducts connects to DB to retrieve the products
// getRevenue connects to DB to retrieve revenue based on the product attributes
// convertRevenue and calculateProfit are pure functions
// saveProfit writes the calculated profit to a DB
getProducts 1 |>
getRevenue |>
convertRevenue |>
calculateProfit |>

Value Object

An Address is a good example of a value object. Both addresses with the same attributes will always be the same.


A User is a good example for an entity. It has an identity and even if two different users have same attributes, it will not be a match.


You can’t perform that action at this time.