Skip to content

Instantly share code, notes, and snippets.

View akritikos's full-sized avatar

Alexandros Kritikos akritikos

View GitHub Profile
internal static class MyExtensions
{
internal static IEnumerable<TResult> FullOuterGroupJoin<TA, TB, TKey, TResult>(
this IEnumerable<TA> a,
IEnumerable<TB> b,
Func<TA, TKey> selectKeyA,
Func<TB, TKey> selectKeyB,
Func<IEnumerable<TA>, IEnumerable<TB>, TKey, TResult> projection,
IEqualityComparer<TKey> cmp = null)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore.Database.Command", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.Hosting.Lifetime", LogEventLevel.Information)
.MinimumLevel.Override("System", LogEventLevel.Error)
.Enrich.WithProperty("Application", Assembly.GetAssembly(typeof(Program))?.GetName().Name)
.Enrich.FromLogContext()
.WriteTo.Console(theme: AnsiConsoleTheme.Code, standardErrorFromLevel: LogEventLevel.Verbose)
.WriteTo.File(
Path.Combine(
{
"definitions": {},
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "http://example.com/example.json",
"type": "object",
"properties": {
"modules": {
"$id": "/properties/modules",
"type": "array",
"items": {
@akritikos
akritikos / smb.conf
Created November 25, 2015 15:58
PI Samba config
[global]
workgroup = Workgroup
server string = %L Shares (samba %v)
netbios name = ATLAS
security = user
encrypt passwords = yes
# smb passwd file = /etc/samba/smbpasswd
local master = yes
preferred master = yes
domain master = yes
@akritikos
akritikos / Picard Tags
Last active February 10, 2017 14:35
Usual tags for lib self-maintenance
$noop(Unset ID on Soundtracks and normalize AlbumArtist)
$if($in(%releasetype%,soundtrack),$set(albumartist,Soundtracks) $unset(musicbrainz_albumartistid) $set(albumartistsort,Soundtracks),$noop())
$noop(Normalize AlbumArtist on Compilations)
$if($in(%releasetype%,compilation),$set(albumartist,Compilations) $set(albumartistsort,Compilations),$noop())
$noop(Converts date from dd/mm/yyyy to year-only)
$set(date,$left(%date%,4))
$noop(Pads track number to two digits at least)
$set(tracknumber,$num(%tracknumber%,2))
$noop(Split multiple artists)
$if($in(%artists%,;),
@akritikos
akritikos / keybase.md
Last active September 19, 2019 14:26

Keybase proof

I hereby claim:

  • I am akritikos on github.
  • I am akritikos (https://keybase.io/akritikos) on keybase.
  • I have a public key ASBSrhuPtYFRNAPnK55jgY44M4WfJCJmygwTYOfebARhtwo

To claim this, I am signing this object: