Skip to content

Instantly share code, notes, and snippets.

View odytrice's full-sized avatar

Ody Mbegbu odytrice

View GitHub Profile
@odytrice
odytrice / BitcoinActor.fs
Created June 19, 2024 14:11
Bitcoin Indexer
module Nomad.Bitcoin.Indexer.BitcoinActors
open System
open System.Linq
open Akka.FSharp
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Logging
open Nomad.Bitcoin.Core.Contracts
open Nomad.Bitcoin.Core.Domain
open Nomad.Bitcoin.Core.Domain.Errors
{
"name": "Example Pool",
"description": "Cardano stakepool example",
"ticker": "STEAK",
"homepage": "https://github.com/abracadaniel/cardano-node-docker"
}
@odytrice
odytrice / restore-rkestate-file.md
Created November 24, 2020 02:20 — forked from superseb/restore-rkestate-file.md
Recover cluster.rkestate file from controlplane node

Recover cluster.rkestate file from controlplane node

RKE

Run on controlplane node, uses any found hyperkube image

docker run --rm --net=host -v $(docker inspect kubelet --format '{{ range .Mounts }}{{ if eq .Destination "/etc/kubernetes" }}{{ .Source }}{{ end }}{{ end }}')/ssl:/etc/kubernetes/ssl:ro --entrypoint bash $(docker inspect $(docker images -q --filter=label=org.label-schema.vcs-url=https://github.com/rancher/hyperkube.git) --format='{{index .RepoTags 0}}' | tail -1) -c 'kubectl --kubeconfig /etc/kubernetes/ssl/kubecfg-kube-node.yaml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .' > cluster.rkestate
@odytrice
odytrice / RecordProvider.fs
Created May 24, 2020 21:55
Simple F# Type Provider for Mutable Records
namespace TestProvider.Provided
open System.Reflection
open FSharp.Core.CompilerServices
open ProviderImplementation.ProvidedTypes
open System.Collections.Generic
open Microsoft.FSharp.Quotations
[<TypeProvider>]
type SampleProvider(config) as this =
@odytrice
odytrice / windows-terminal-profile.json
Last active February 16, 2020 22:46
Ody's Windows Terminal Profile
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals" :
{
"alwaysShowTabs" : true,
"copyOnSelect" : false,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
@odytrice
odytrice / self-signed-certificate-with-custom-ca.md
Created September 12, 2019 08:30 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

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
odytrice / README.md
Last active March 24, 2023 07:24
Kubectx, Kubens for Windows (Powershell)
@odytrice
odytrice / minikube.ps1
Last active January 31, 2019 12:35
Minikube PowerShell
# 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
odytrice / Conversion.bat
Created December 31, 2018 20:28 — forked from andrewabest/Conversion.bat
Convert a crt + p7b (from godaddy) to pfx
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
odytrice / migrate.bat
Last active March 28, 2018 10:58
Migration File for Fluent Migrator for F# projects
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"