Skip to content

Instantly share code, notes, and snippets.

View krake747's full-sized avatar

Kevin K. krake747

  • Luxembourg
  • 09:46 (UTC +02:00)
View GitHub Profile
@krake747
krake747 / krake747.PowerShell_profile.ps1
Last active April 27, 2024 17:56
krake747 PowerShell Profile
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/gruvbox.omp.json' | Invoke-Expression
set-alias d docker
set-alias dcu dockerComposeUp
set-alias dcd dockerComposeDown
set-alias dcip dockerImagePrune
set-alias dn dotnet
set-alias g git
function dockerComposeUp {
@krake747
krake747 / krake747.prettierrc
Created February 9, 2024 18:09
krake747 Prettier config
{
"printWidth": 100,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
@krake747
krake747 / krake747.code-workspace
Created February 9, 2024 18:01
General VS Code workspace
{
"folders": [
{
"name": "root",
"path": "."
}
],
"settings": {
"editor.fontFamily": "JetBrains Mono, Cascadia Mono, Roboto Mono, Fira Code, Consolas",
"editor.fontLigatures": false,
@krake747
krake747 / NpgsqlTypeHandlers.cs
Last active January 28, 2024 15:14
PostgreSQL Dapper DateOnly and TimeOnly Type Handlers
using System.Data;
using Dapper;
namespace Krake747.Infrastructure.TypeHandlers.Npgsql;
internal sealed class DateOnlyTypeHandler : SqlMapper.TypeHandler<DateOnly>
{
public override DateOnly Parse(object value) => DateOnly.FromDateTime((DateTime)value);
public override void SetValue(IDbDataParameter parameter, DateOnly value)