This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public readonly struct MayBe<T> : IEquatable<MayBe<T>> where T : class | |
{ | |
private readonly T _value; | |
public MayBe(T value) | |
{ | |
_value = value; | |
HasValue = !(value is null); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class StronglyTypedId<TValue> where TValue : notnull | |
{ | |
protected StronglyTypedId(TValue value) | |
{ | |
if (!IsValid(value)) | |
{ | |
throw new ArgumentException($"{value} is not a valid value for this id"); | |
} | |
Value = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Library.CustomExtensions | |
{ | |
/// <summary> | |
/// Provides extension methods for Task objects. | |
/// </summary> | |
public static class TaskExtensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an official Ruby runtime as a parent image | |
FROM ruby:3.2.2-bookworm | |
# Install Node.js for some js dependencies | |
RUN apt-get update -qq && apt-get install -y nodejs | |
# Install Jekyll and Bundler | |
RUN gem install bundler jekyll | |
# Set the working directory in the image to /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public static class ExtensionMethods | |
{ | |
public static bool In<T>(this T item, IEqualityComparer<T> comparer, params T[] collection) | |
{ | |
if (!collection.Any()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# compatible with python 2.x and 3.x | |
import math | |
import re | |
''' | |
--------------------- Copyright Block ---------------------- | |
praytimes.py: Prayer Times Calculator (ver 2.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
## Copyright (C) 2009-2012 Assem Chelli <assem.ch [at] gmail.com> | |
## This program is free software: you can redistribute it and/or modify | |
## it under the terms of the GNU Affero General Public License as published by | |
## the Free Software Foundation, either version 3 of the License, or | |
## (at your option) any later version. | |
## This program is distributed in the hope that it will be useful, |