Skip to content

Instantly share code, notes, and snippets.

View alejofv's full-sized avatar

Alejandro Figueroa alejofv

View GitHub Profile
@davidfowl
davidfowl / .NET6Migration.md
Last active March 7, 2026 11:20
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 13, 2026 09:00
Minimal APIs at a glance
@KelsonBall
KelsonBall / ConsoleApp1.csproj
Last active December 20, 2020 20:46
Curly Bracketn't Todos List API in C#
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@jbtule
jbtule / fsharp-onboarding.md
Last active October 12, 2021 15:15
F# onboarding from c# - 2018

Set yourself up for using Exercism

http://exercism.io/

To unlock these execerises you will need to disabled learning mode.

Practice c#

In Exercism you'll have some exercises to

@eactisgrosso
eactisgrosso / .groovy
Last active January 4, 2023 16:40
Jenkinsfile for building and running .NET Core images in Amazon ECS
#!/usr/bin/env groovy
pipeline {
agent { label 'master' }
stages {
stage('Checkout') {
steps {
checkout scm
}
}
@gabrielrobert
gabrielrobert / .editorconfig
Last active October 10, 2019 20:42
.editorconfig
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[project.json]
@VojtechStep
VojtechStep / Config.ps1
Last active October 5, 2022 05:27
Powerline-style PowerShell prompt (git support and extensible)
#If this isn't the user using the shell, username@host will be displayed (if enabled)
$DEFAULT_USER='Adalbert'
#True to print username@host event if it's the default user
$PRINT_DEFAULT_USER=$FALSE
#Glyphs
$SEGMENT_DELIMETER_GLYPH=[char]0xE0B0 # î‚°
$PREV_CMD_FAIL_GLYPH=[char]0x2718 # ✘
$BGTASK_GLYPH=[char]0x2699 # âš™
@ehsan-davoudi
ehsan-davoudi / gist:8688427
Created January 29, 2014 13:54
Run List of Tasks Asynchronously with async/await in C#
Assume we have a list of tasks and we need to run them asynchronously, we can use below code:
var toDoTasks = new List<OurTask>();
IEnumerable<Task<int>> taskListQuery = from toDoTask in toDoTasks select DoSomething(ourTask);
List<Task<int>> taskList = taskListQuery.ToList();
while (taskList.Count > 0)
{
Task<int> firstFinishedTask = await Task.WhenAny(taskList);
@btbytes
btbytes / base36_encode_decode.sql
Created October 25, 2013 18:53
Base36 Conversion in PostgreSQL
-- source: http://www.jamiebegin.com/base36-conversion-in-postgresql/
CREATE OR REPLACE FUNCTION base36_encode(IN digits bigint, IN min_width int = 0)
RETURNS varchar AS $$
DECLARE
chars char[];
ret varchar;
val bigint;
BEGIN
chars := ARRAY['0','1','2','3','4','5','6','7','8','9'
,'A','B','C','D','E','F','G','H','I','J','K','L','M'