This file contains hidden or 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
version: "3.9" | |
services: | |
postgres: | |
container_name: postgres-container | |
image: postgres | |
restart: always | |
ports: | |
- '5432:5432' | |
volumes: | |
- ./db:/var/lib/postgresql/data |
This file contains hidden or 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
version: "3.9" | |
services: | |
portainer: | |
image: portainer/portainer-ce:latest | |
ports: | |
- 9000:9000 | |
container_name: portainer | |
# username: admin , password: 123 , hash command : htpasswd -nb -B admin 123 | cut -d ":" -f 2 | |
command: --admin-password "$$2y$$05$$aZhNvtX9GSAIUXPbfKq6dudTMuJcJuLnwWmz2HBnBq23fAlzrAyeu" -H unix:///var/run/docker.sock | |
volumes: |
This file contains hidden or 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
function getHightlightCoords() { | |
var pageIndex = PDFViewerApplication.pdfViewer.currentPageNumber - 1; | |
var page = PDFViewerApplication.pdfViewer.getPageView(pageIndex); | |
var pageRect = page.canvas.getClientRects()[0]; | |
var selectionRects = window.getSelection().getRangeAt(0).getClientRects(); | |
var viewport = page.viewport; | |
var selected = selectionRects.map(function (r) { | |
return viewport.convertToPdfPoint(r.left - pageRect.x, r.top - pageRect.y).concat( | |
viewport.convertToPdfPoint(r.right - pageRect.x, r.bottom - pageRect.y)); | |
}); |
This file contains hidden or 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
using NetArchTest.Rules; | |
using WebApi2.Services; | |
using Xunit; | |
/// <summary> | |
/// NetArchTest | |
/// https://github.com/BenMorris/NetArchTest | |
/// </summary> | |
namespace NetArch | |
{ |
This file contains hidden or 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
using DataLib; | |
using FluentAssertions; | |
using NSubstitute; | |
using NSubstitute.ReturnsExtensions; | |
using System; | |
using WebApi2.Models; | |
using WebApi2.Services; | |
using Xunit; | |
/// <summary> |
This file contains hidden or 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
using DataLib; | |
using NSubstitute; | |
using NSubstitute.ReturnsExtensions; | |
using WebApi2.Models; | |
using WebApi2.Services; | |
using Xunit; | |
/// <summary> | |
/// Clean mocking for unit tests using NSubstitute in .NET (Core, Framework, Standard) | |
/// https://www.youtube.com/watch?v=LcQYv0cBWk0& |
This file contains hidden or 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
using App1; | |
using Xunit; | |
/// <summary> | |
/// How to collect the code coverage of your tests in .NET | |
/// https://www.youtube.com/watch?v=xwMWGYD8rgk | |
/// Calculate code coverage by cli command | |
/// dotnet tool install -g coverlet.console | |
/// coverlet .\bin\Debug\net5.0\App1.dll --target "dotnet" --targetargs "test --no-build" | |
/// dotnet test --collect:"XPlat Code Coverage" |
This file contains hidden or 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
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using Mapster; | |
using System; | |
/// <summary> | |
/// Mapster, the best .NET mapper that you are (probably) not using | |
/// https://www.youtube.com/watch?v=UIslFVEHkzA | |
/// </summary> | |
public class Program |
This file contains hidden or 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
/// <summary> | |
/// Functional Programming with C# - Simon Painter - NDC Oslo 2020 | |
/// https://www.youtube.com/watch?v=gvyTB4aMI4o | |
/// </summary> | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.Json.Serialization; | |
using System.Text.RegularExpressions; |
This file contains hidden or 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
REM Delete eval folder with licence key and options.xml which contains a reference to it | |
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do ( | |
for /d %%a in ("%USERPROFILE%\.%%I*") do ( | |
rd /s /q "%%a/config/eval" | |
del /q "%%a\config\options\other.xml" | |
) | |
) | |
REM Delete registry key and jetbrains folder (not sure if needet but however) | |
rmdir /s /q "%APPDATA%\JetBrains" |