Skip to content

Instantly share code, notes, and snippets.

View Logerfo's full-sized avatar

Bruno Logerfo Logerfo

View GitHub Profile
@xoofx
xoofx / BuildtimeOptimizedRoslynSourceGenerator.cs
Last active December 10, 2022 14:03
Roslyn Source Generator optimized for build time only usage
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using Microsoft.CodeAnalysis.Text;
namespace SourceGenLib
@ngnmtl
ngnmtl / export.py
Created July 13, 2020 04:17 — forked from ahmed-abdelazim/export.py
Export / import AWS dynamodb table from json file with correct data types using python
from __future__ import print_function # Python 2/3 compatibility
import json
import boto3
# AWS_ACCESS = ""
# AWS_SECRET = ""
AWS_REGION = "eu-west-3"
TABLE_NAME = "users"
client = boto3.client(
@aethercowboy
aethercowboy / ExampleGame.cs
Last active May 1, 2024 13:28
Monogame with IHostedService DI
public class ExampleGame : Game, IGame
{
public Game Game => this;
private readonly ISomeDependency _someDependency;
public ExampleGame(ISomeDependency someDependency)
{
_someDependency = someDependency;
}
@jaredpar
jaredpar / buffalo.cs
Last active January 31, 2022 12:19
buffalo.cs
using System;
using System.Runtime.CompilerServices;
class await {
async async async(async async) => await async(async(async));
}
[AsyncMethodBuilder(typeof(builder))]
delegate async async(async async);
[Unit]
Description=Screen Test
After=network.target
[Service]
Type=forking
User=root
Group=root
Restart=on-failure
RestartSec=3
@Eihen
Eihen / asf.service
Last active January 18, 2022 12:54
Sample systemd unit service for ArchSteamFarm
[Unit]
Description=ArchSteamFarm
After=network-online.target
[Service]
Type=simple
User={user}
Group={group}
Restart=always
RestartSec=15s