-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Important changes / new features: - Rewritten in C# using the .NET Core 3 framework - Updated layout & stylesheets - Docker support
- Loading branch information
Showing
79 changed files
with
40,034 additions
and
696 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet-core | ||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.csproj ./ | ||
RUN dotnet restore | ||
|
||
# copy everything else and build app | ||
COPY . ./ | ||
WORKDIR /source | ||
RUN dotnet publish -c release -o /app --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
ENTRYPOINT ["dotnet", "WhatTheFuckShouldLukasHaveForLunch.dll"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace WhatTheFuckShouldLukasHaveForLunch.Exceptions | ||
{ | ||
public class MensaClosedException : Exception | ||
{ | ||
public MensaClosedException(string message): base(message) | ||
{ | ||
|
||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Globalization; | ||
|
||
namespace WhatTheFuckShouldLukasHaveForLunch.Helper | ||
{ | ||
public class DateHelper | ||
{ | ||
private const string Format = "dd.MM.yyyy"; | ||
|
||
public static int TodaysDayOfYear = DateTime.Today.DayOfYear; | ||
|
||
public static DateTime ParseDate(string value) => DateTime.ParseExact(value, Format, null); | ||
|
||
public static int CurrentWeeknumber = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday); | ||
|
||
public static bool IsSameDay(DateTime date1, DateTime date2) => date1.DayOfYear == date2.DayOfYear; | ||
} | ||
} |
Oops, something went wrong.