Skip to content

Instantly share code, notes, and snippets.

View jesulink2514's full-sized avatar
🎯
Focusing

Jesus Angulo jesulink2514

🎯
Focusing
View GitHub Profile
@jesulink2514
jesulink2514 / DockerFile
Created August 15, 2022 15:52
DockerFile for newman
FROM postman/newman:5.3.0-alpine as base
WORKDIR /etc/newman
RUN npm install -g newman-reporter-html
RUN npm install -g newman-reporter-json-summary
COPY ["tests/", "./"]
ENTRYPOINT newman run sample.postman_collection.json --environment=sample-local.postman_environment.json --reporters cli,json --reporter-json-export /data/results/outputfile.json
@jesulink2514
jesulink2514 / docker-compose.yml
Created August 15, 2022 01:35
initial docker-compose e2e test API
version: '3.4'
services:
sampleapi:
image: sampleapi
build:
context: .
dockerfile: sample-api/Dockerfile
ports:
- 8080:8080
@jesulink2514
jesulink2514 / docker-compose.yml
Created August 15, 2022 01:34
e2e API Docker-compose.yml
version: '3.4'
services:
sampleapi:
image: sampleapi
build:
context: .
dockerfile: sample-api/Dockerfile
ports:
- 8080:8080
#!/bin/bash
dacpac="false"
sqlfiles="false"
SApassword=$1
dacpath=$2
sqlpath=$3
echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql
for i in {1..60};
do
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick a version of .NET: 3.1-focal, 6.0-focal
VARIANT: "6.0-focal"
@jesulink2514
jesulink2514 / package.json
Created May 15, 2022 23:33
package.json for Next.js
{
"name": "nextjs-sample",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"start": "next start",
"lint": "next lint"
},
@jesulink2514
jesulink2514 / next.config.js
Created May 15, 2022 23:25
next.config.js for static export
/** @type {import('next').NextConfig} */
const rewrites = () => {
return [
{
source: "/api/:path*",
destination: "http://localhost:5204/api/:path*",
},
];
};
@jesulink2514
jesulink2514 / net60-react.csproj
Created May 15, 2022 23:14
net60-react.csproj with Next.js
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
@jesulink2514
jesulink2514 / net60-react.csproj
Created May 15, 2022 22:09
net60-react.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
@jesulink2514
jesulink2514 / IViewEngine.cs
Last active May 5, 2021 14:19
Sample code of ASP.net MVC IViewEngine interface
namespace System.Web.Mvc
{
public interface IViewEngine
{
ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache);
ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache);
void ReleaseView(ControllerContext controllerContext, IView view);
}