Skip to content

Instantly share code, notes, and snippets.

View NBprojekt's full-sized avatar
:octocat:
Work smarter, not harder

Norbert Bartko NBprojekt

:octocat:
Work smarter, not harder
View GitHub Profile

SPA Webserver

This is the webserver configuration I use local for production preview or inside docker container, mostly to host angular apps.

Configuration

You can configure the server, changing the values of the config object.

// TODO: Add attribute table with default values and description

# This command may be required before executing the script
#Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Force;
# Logs are placed on the current users desktop
Start-Transcript -Path "~/Desktop/install.log";
# Install Chocolatey
$chocoVersion = powershell choco -v;
if(-not($chocoVersion)) {
Write-Output "Seems Chocolatey is not installed, installing now";
@NBprojekt
NBprojekt / README.md
Last active May 11, 2021 13:54
Fetches all unique file types in all subfolders

Search unique file types

This script returns all unique file type in a given directory, including subdirectories.

Optional parameter: ROOT_DIR (default: ./)

py search-unique-file-types.py ./your-dir
@NBprojekt
NBprojekt / README.md
Last active January 13, 2021 11:05
Open-VPN Start Before Logon Service

Open-VPN SBL

Create Open-VPN Connection on Boot to apply Group Policy and ensure the user can log in using Active Directory

  1. Download (nssm)(https://nssm.cc/download) and place it next to the Powershell script
  2. Run the Powershell script using an elevated command line
  3. (Optional) Delete script and exe
  4. Reboot
@NBprojekt
NBprojekt / README.md
Last active December 28, 2020 09:58
Deploy nuget package to GitHub using GitHub Actions

Deploy nuget package to GitHub using GitHub Actions

Token

First you need to create an Personal access token with the write:packages scope

Action

.github-cd.yml

name: GitHub CD
@NBprojekt
NBprojekt / .gitignore
Last active January 11, 2024 03:18
My gitignore for Blazor projects
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
.vs
*/.vs
*.suo
*.user
*.sln.docstates
@NBprojekt
NBprojekt / README.md
Last active August 26, 2020 09:01
Action for .NET Application using Telerik

How to build dotnet apps like Blazor that use Telerik, inside of Github actions.

console.log(`
_ _ _ _
| | (_) | | | |
_ __ | |__ _ __ _ __ ___ _ ___| | _| |_
| '_ \\| '_ \\| '_ \\| '__/ _ \\| |/ _ \\ |/ / __|
| | | | |_) | |_) | | | (_) | | __/ <| |_
|_| |_|_.__/| .__/|_| \\___/| |\\___|_|\\_\\\\__|
| | _/ |
|_| |__/
`);

Collection of useful git commands

Show current branch

git branch --show-current

Empty commit to init branch

git commit --allow-empty -m "Init branch"
@NBprojekt
NBprojekt / material-elevation.css
Last active December 10, 2020 16:47
Includes all material elevation classes
:root {
/* Just for theming purposes */
--mat-elevation-color: 0, 0, 0;
}
.mat-elevation-z0 {
box-shadow: 0 0 0 0 rgba(var(--mat-elevation-color), .2),
0 0 0 0 rgba(var(--mat-elevation-color), .14),
0 0 0 0 rgba(var(--mat-elevation-color), .12);
}