Skip to content

Instantly share code, notes, and snippets.

View mkojoa's full-sized avatar
💻
Probably coding something stupid

Michael Ameyaw mkojoa

💻
Probably coding something stupid
View GitHub Profile
@mkojoa
mkojoa / ssl-install
Created October 23, 2022 16:22
Ssl_setup
# Docker with SSL and an nginx reverse proxy
Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.
Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701)).
# 1. Create a `conf` file with information about the cert you'll be creating
It should look something like the content below; call it `my-site.conf` or something like that.
```
@mkojoa
mkojoa / FizzBuzzGame.py
Created January 23, 2021 18:34
But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
using System;
namespace FizzBuzzGame
{
public class GameFizzBzz
{
//lenght prop
public int Lenght { get; set; }
// By default lenght
@mkojoa
mkojoa / temperature-convert.py
Created January 23, 2021 17:39
Convert the value for Fahrenheit to Celsius and insert the result into lbl_result
import tkinter as tk
def fahrenheit_to_celsius():
"""Convert the value for Fahrenheit to Celsius and insert the
result into lbl_result.
"""
fahrenheit = ent_temperature.get()
celsius = (5/9) * (float(fahrenheit) - 32)
lbl_result["text"] = f"{round(celsius, 2)} \N{DEGREE CELSIUS}"