Skip to content

Instantly share code, notes, and snippets.

View cmendible's full-sized avatar
🖖
Cloud for all

Carlos Mendible cmendible

🖖
Cloud for all
View GitHub Profile
Seems more likely now.
First, what version of WSL are you on?
> wsl.exe --version
Second, to confirm this, we would add:
[wsl2]
debugConsole=true
@GiovanniGrieco
GiovanniGrieco / podman_on_wsl2.md
Last active March 3, 2025 13:44
Install Podman on WSL2

Install Podman on Windows Subsystem for Linux 2 (WSL2)

This guide allows a safe and rootless installation of Podman on WSL2. Head over the hyperlinks to discover more about these two wonderful technologies!

This guide assumes that Debian 11 "bullseye" is installed as WSL2 base OS. To do it, simply open your Windows Powershell console under Admin rights and run

PS> wsl install -d Debian

After installation, please check that you are under the latest Debian. If not, please upgrade it.

@cmendible
cmendible / addcasa.ps1
Created February 3, 2018 19:59
Powershell Script to add Code Analysis and Style Cop to all your .NET Core Projects.
# Place the script in the solution folder
# Add the ca.ruleset to the solution folder
# Run the Powershell Script to add Code Analysis and StyleCop to all your .NET Core Projects.
$projects = (Get-ChildItem . -recurse) | Where-Object {$_.extension -eq ".csproj"}
foreach ($project in $projects) {
$content = Get-Content $project.FullName
if (!($content | Select-String -pattern "<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>")) {
$content = $content.Replace("</Project>", "`t<PropertyGroup>`r`n`t`t<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>`r`n`t</PropertyGroup>`r`n</Project>")
$content | Out-File $project.FullName -Encoding Default
}
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active February 3, 2025 10:55
Ansible variable precedence (order, hierarchy)
@nohwnd
nohwnd / Uninstall-Pester.ps1
Last active January 26, 2025 12:21
Remove built-in version of Pester 3 (or -All) from Windows 10 Program Files and Program Files (x86).
#Requires -RunAsAdministrator
function Uninstall-Pester ([switch]$All) {
if ([IntPtr]::Size * 8 -ne 64) { throw "Run this script from 64bit PowerShell." }
#Requires -RunAsAdministrator
$pesterPaths = foreach ($programFiles in ($env:ProgramFiles, ${env:ProgramFiles(x86)})) {
$path = "$programFiles\WindowsPowerShell\Modules\Pester"
if ($null -ne $programFiles -and (Test-Path $path)) {
if ($All) {
@pshrosbree
pshrosbree / DeserializeAzureEventHubCapture.cs
Last active February 14, 2023 11:06
Deserializing Azure event hub capture files from Apache Avro with C#
/*
NuGet references:
Microsoft.Hadoop.Avro2 (1.2.1 works)
WindowsAzure.Storage (8.3.0 works)
Namespaces:
Microsoft.Hadoop.Avro.Container
Microsoft.WindowsAzure.Storage
*/
@cmendible
cmendible / VersionTelemetryInitializer.cs
Last active October 28, 2020 15:23
Application Insights Telemetry Initializer to send the application version and a custom "tags" property
namespace Insights
{
using System.Configuration;
using System.Linq;
using System.Reflection;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Extensibility;
/// <summary>
/// Version TelemetryInitializer
@davidfowl
davidfowl / dotnetlayout.md
Last active April 14, 2025 07:13
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/