Skip to content

Instantly share code, notes, and snippets.

Working from home

Ody Mbegbu odytrice

Working from home
Block or report user

Report or block odytrice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
odytrice / windows-terminal-profile.json
Created Sep 28, 2019
Ody's Windows Terminal Profile
View windows-terminal-profile.json
"$schema": "",
"globals" :
"alwaysShowTabs" : true,
"copyOnSelect" : false,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
odytrice /
Created Jun 2, 2019
Kubectx, Kubens for Windows (Powershell)
odytrice / minikube.ps1
Last active Jan 31, 2019
Minikube PowerShell
View minikube.ps1
# This starts minikube and configures docker to point to minikube cluster
Welcome to Minikube Docker Shell
"- Checking Minikube Status"
$isRunning = ((minikube status) -join ' ' ).Contains("Running")
odytrice / Conversion.bat
Created Dec 31, 2018 — forked from andrewabest/Conversion.bat
Convert a crt + p7b (from godaddy) to pfx
View Conversion.bat
echo off
:: download OpenSSL if you don't have it for the below
:: Conver the p7b into PEM format
openssl pkcs7 -in mydomain.p7b -print_certs -out mydomain.pem
:: Combine this with the crt server certificate and private key into a PFX
openssl pkcs12 -export -in mydomain.crt -inkey mydomain.key -certfile mydomain.pem -out mydomain.pfx
odytrice / migrate.bat
Last active Mar 28, 2018
Migration File for Fluent Migrator for F# projects
View migrate.bat
REM Migrate Database
packages\FluentMigrator\tools\Migrate.exe --db=sqlserver --target=Dumia.Migrations\bin\Debug\Dumia.Migrations.dll --configPath=Dumia.Http\web.config --c=Dumia %*
REM Update Database DBML file
.\utils\SqlMetal.exe /server:"(local)" /database:dumia /user:admin1 /password:admin1 /dbml:"Dumia.Infrastructure/Database.dbml"
odytrice / ImageService.cs
Last active Sep 28, 2019
Image Processor
View ImageService.cs
public class ImageService : IImageService
#region Scale Stream
public Stream ScaleWidth(Stream imageStream, int maxWidth)
var output = new MemoryStream();
//Get Image from Stream
using (var image = Image.FromStream(imageStream))
odytrice /
Last active Sep 12, 2017 — forked from dgoguerra/
Setup p4merge as difftool and mergetool on Windows

P4Merge Windows Configuration

Setting up p4merge as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.

Two alternatives are explained: using the command line, and directly editing the config file.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

odytrice / ExcelProcessor.cs
Last active Sep 28, 2019
Excel Processor using EPPlus Nuget Package
View ExcelProcessor.cs
public class ExcelProcessor
public Stream Generate<T>(Dictionary<string, IEnumerable<T>> Sheets)
//Generate Excel Workbook in Memory
using (var excel = new ExcelPackage())
if (Sheets.Any() == false) throw new Exception("No Sheets were supplied");
foreach (var pair in Sheets)
odytrice / Extensions.cs
Last active Sep 28, 2019
Generic Abstract Model
View Extensions.cs
public static class Extensions
public static T ParseEnum<T>(this string value) where T : struct
if (Enum.TryParse(value, true, out T enumobj))
return enumobj;
You can’t perform that action at this time.