Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Giovanni Costagliola MrBogomips

💭
I may be slow to respond.
View GitHub Profile
@MrBogomips
MrBogomips / CSharp_EnvironmentVariablesLoggerFunction.cs
Created Dec 5, 2020
C# Environment Variables Logger Function
View CSharp_EnvironmentVariablesLoggerFunction.cs
private static void LogEnvironmentInfo(ILogger<YOUR_CLASS> log) {
var envs = Environment.GetEnvironmentVariables();
StringBuilder sb = new StringBuilder();
foreach (var k in envs.Keys) sb.AppendLine($"{k}: {envs[k]}");
log.LogInformation(sb.ToString());
}
@MrBogomips
MrBogomips / # gradle - 2019-10-23_14-03-29.txt
Created Oct 23, 2019
gradle on macOS 10.15 - Homebrew build logs
View # gradle - 2019-10-23_14-03-29.txt
Homebrew build logs for gradle on macOS 10.15
Build date: 2019-10-23 14:03:29
@MrBogomips
MrBogomips / RandomWeightedPicker.cs
Created May 11, 2016
A Random Weighted Picker in C#
View RandomWeightedPicker.cs
// Author: Giovanni Costagliola <giovanni.costagliola@gmail.com>
using System;
using System.Collections.Generic;
using System.Linq;
namespace Utils
{
/// <summary>
/// Represent a Weighted Item.
@MrBogomips
MrBogomips / .gitignore
Last active Aug 29, 2015
Scala Generic .gitignore
View .gitignore
*.class
*.log
# sbt specific
.cache
.history
.lib/
dist/*
target/
lib_managed/
@MrBogomips
MrBogomips / .gitignore_keepdir
Created Feb 3, 2015
A .gitignore file suitable to keep a directory in a git repository while discarding all the contents.
View .gitignore_keepdir
# ATTENTION: rename this file to .gitignore!!!
# Ignore everything in this directory
*
# Except this file
!.gitignore