This file was generated automatically based on this two sources:
- /etc/nginx/mime.types
- http://www.garykessler.net/library/file_sigs.html
This is a JSON object by following structure:
[string ext] : {
signs: [sign]
This file was generated automatically based on this two sources:
This is a JSON object by following structure:
[string ext] : {
signs: [sign]
| # Ref:https://github.com/DanWahlin/Angular-Docker-Microservices/blob/master/docker-compose.yml | |
| # Run docker-compose build | |
| # Run docker-compose up | |
| # Live long and prosper | |
| version: '3.1' | |
| services: | |
| nginx: |
| Ref: https://stackoverflow.com/a/68958342/7961948 | |
| deleted the node modules and package.lock.json | |
| deleted npm and npm-cahce folder in C:\Users\user\AppData\Roaming and rebooted the PC | |
| Then ran npm cache clean to make sure the cache was correctly cleaned. | |
| Updated the react and react-dom version to ^17.0.0 | |
| Updated my npm version to the most recent too, perhaps this might not be a reason for the error, but i found useful to perform the update. | |
| After that i ran: | |
| npm install |
| // ref: https://github.com/jbogard/MediatR/issues/46 | |
| //Arrange | |
| var mediator = new Mock<IMediator>(); | |
| mediator.Setup(m => m.Send(It.IsAny<QueryModel>(), It.IsAny<CancellationToken>())).ReturnsAsync(It.IsAny<ExpectedResultModel>()); | |
| //Act | |
| await mediator.Object.Send(new QueryModel()); | |
| //Assert |
| // Ref: https://github.com/garronej/tss-react/blob/main/src/mui.ts | |
| // custom hooks for tss-react to expose makeStyles and etc | |
| import { useTheme } from "@mui/material/styles"; | |
| import { createMakeAndWithStyles } from "./index"; | |
| /** @see <https://docs.tss-react.dev/setup> */ | |
| export const { makeStyles, withStyles, useStyles } = createMakeAndWithStyles({ | |
| useTheme, | |
| }); |
| // Ref: https://github.com/devias-io/material-kit-react/blob/main/src/theme/index.js | |
| import { createTheme } from '@mui/material'; | |
| export const theme = createTheme({ | |
| breakpoints: { | |
| values: { | |
| xs: 0, | |
| sm: 600, | |
| md: 1000, |
| // add a custom variable in Material ui | |
| // ref: https://github.com/mui-org/material-ui/issues/13802#issuecomment-444200131 | |
| import createMuiTheme from "@material-ui/core/styles/createMuiTheme"; | |
| import { PaletteColor, PaletteColorOptions } from "@material-ui/core/styles/createPalette"; | |
| declare module "@material-ui/core/styles/createPalette" { | |
| interface Palette { | |
| blue: PaletteColor; |
| import {useState, useEffect} from 'react'; | |
| export const useGetJokes = () : [() => Promise<void>, string[], boolean, string] =>{ | |
| const [joke, setJoke] = useState(['']); | |
| const [isLoading, setIsLoading] = useState(false); | |
| const [error, setError] = useState(''); | |
| const endpoint = 'https://sv443.net/jokeapi/v2/joke/Any?blacklistFlags=racist&type=single'; | |
| const getJoke = async () => { |
| namespace MyDotNetCore.App | |
| { | |
| using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore; | |
| public class ApplicationDbContext : IdentityDbContext | |
| { | |
| public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) | |
| : base(options) | |
| { | |
| } |
| var options = {}; | |
| // jQuery options | |
| // options.url = foo; | |
| // CSRF Token | |
| var csrfToken = $("input[name='__RequestVerificationToken']").val(); | |
| if (csrfToken) { | |
| options.headers = { |