Skip to content

Instantly share code, notes, and snippets.

View dario-l's full-sized avatar

Dariusz Lenartowicz dario-l

View GitHub Profile
@davidfowl
davidfowl / .NET6Migration.md
Last active October 23, 2024 18:30
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active October 24, 2024 13:39
Minimal APIs at a glance
@lennybacon
lennybacon / New-AES256Key.ps1
Last active August 7, 2024 10:35
Generate a new AES 256 Key with PowerShell
$random = [System.Security.Cryptography.RandomNumberGenerator]::Create();
$buffer = New-Object byte[] 32;
$random.GetBytes($buffer);
[BitConverter]::ToString($buffer).Replace("-", [string]::Empty);
@mosquito
mosquito / README.md
Last active November 14, 2024 08:39
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@vladikk
vladikk / ExecutionResult.cs
Created March 19, 2017 14:57
Command execution result object for CQRS based systems
using System;
namespace Example
{
public abstract class ExecutionResult
{
protected ExecutionResult(Guid aggregateId, Guid commandId, DateTime executedOn)
{
AggregateId = aggregateId;
CommandId = commandId;
@johnnyasantoss
johnnyasantoss / publish.cake
Created March 17, 2017 21:02
Deploy usando cake build
#addin "Cake.IIS"
#addin "Cake.Http"
#addin "Cake.Services"
using System;
string servidor = null;
var servidores = Argument<string>("AppServers", string.Empty).Split(',');
var appPoolOrService = Argument<string>("AppPoolOrService", string.Empty);
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace FileAnalyzer
{
public class Record
{
public DateTime Start => DateTime.Parse(_line.Split(' ')[0]);
void Main()
{
var pushId = FirebasePushIDGenerator.GeneratePushID();
Console.WriteLine(pushId);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/*
Some helpful Linq extensions I've used with Unity.
Original code from stackoverflow.com where user contributions are
licensed under CC-BY-SA 3.0 with attribution required.
@andrewabest
andrewabest / ContinuousDeploymentWithGitVersionAndGitFlow.md
Last active October 28, 2020 10:21
How to use GitVersion for semantic versioning with TeamCity and Octopus Deploy

Setting up TeamCity and Octopus with GitVersion

Assumptions

  • You are using GitFlow
  • You want to deploy a new version of your software every time a commit is made to the develop branch
  • You are using Octopack to package your application for deployment

Instructions