Skip to content

Instantly share code, notes, and snippets.

@freix1
freix1 / programming_general.md
Created May 2, 2022 20:02
[General Programming]

Abstract Class vs. Interface

An abstract class allows you to create functionality that subclasses can implement or override. An interface only allows you to define functionality, not implement it. And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.

@freix1
freix1 / docker.md
Last active November 10, 2022 15:53
[Docker]

Installation on Debian (+ Raspbian)

Source: https://docs.docker.com/engine/install/debian/

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Create container via docker-compose

Create container for a MSSQL Server instance

@freix1
freix1 / macOS.md
Last active June 7, 2022 10:48
[Mac]

Terminal

Get own IP address

en0 = default for wireless adapter, en1 = default for ethernet

ipconfig getifaddr en0
@freix1
freix1 / ef-core.md
Last active June 23, 2022 22:24
[Entity Framework Core] #CSharp

Installation

macOS

dotnet tool install --global dotnet-ef
export PATH="$PATH:$HOME/.dotnet/tools"

Migrations

Add a new migration

.NET CLI

@freix1
freix1 / prisma.md
Last active June 27, 2022 09:13
[Prisma]

Installation

npm install prisma --save-dev
npm install @prisma/client --save-dev

Push schema to the database

Schema file schema.prisma should either be in the default directory ./prisma/ or provided with the --schema option or set as prisma.schema in the package.json file.

npx prisma db push
@freix1
freix1 / wireguard.md
Last active November 10, 2022 13:55
[Wireguard] with PiVPN

Configuration

  • IP: 192.168.1.200
  • Port: 51820

Users

Add new client profile

pivpn add

Important: For each user that wants to use Wireguard a distinct client profile should be created!