Skip to content

Instantly share code, notes, and snippets.

View coverband's full-sized avatar

coverband coverband

View GitHub Profile

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@coverband
coverband / Dockerfile
Created December 16, 2023 04:25
Sample SQL Server docker container with full-text search
# Copied from https://github.com/tspence/docker-examples/blob/main/sqlserver-fulltext/Dockerfile
# As of August 2023, I believe this is the current version of SQL Server available for use
FROM mcr.microsoft.com/mssql/server:2022-latest
# Switch to root to install fulltext - apt-get won't work unless you switch users!
USER root
# Install dependencies - these are required to make changes to apt-get below
RUN apt-get update
RUN apt-get install -yq gnupg gnupg2 gnupg1 curl apt-transport-https
@coverband
coverband / nginx.conf
Created February 15, 2023 01:29 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
-- DateDiff function that returns the difference between two timestamps in the given date_part (weeks, months, etc) as an integer
-- This behaves like the DateDiff function in warehouses like Redshift and Snowflake, which count the boundaries between date_parts
CREATE OR REPLACE FUNCTION datediff (date_part VARCHAR(30), start_t TIMESTAMP, end_t TIMESTAMP)
RETURNS INT AS $diff$
DECLARE
years INT = 0;
days INT = 0;
hours INT = 0;
minutes INT = 0;
@coverband
coverband / GetBaseDomain.sql
Created November 16, 2016 00:08
SQL Code Snippets - GetBaseDomain() and GetSubdomain() User Functions
/*
-- TEST URLs
CREATE TABLE #testurls (url nvarchar(255));
INSERT INTO #testurls (url) VALUES ('http://www.xyz.bbb.mycompany.co.br/ddd//dd?xxx'), ('HTTPS://www.x.y.z.bbb.mycompany.com/ddd//dd?xxx'),
('HTTPS://www.x.y.z.bbb.mycompany.com.br/ddd//dd?xxx'), ('http://mycompany.gen.tr'), ('http://mycompany.mq'), ('http://mycompany.github.io'),
('http://www.mycompany.name'), ('https://mycompany.name') , ('httpS://somedomain.unknowntld'), ('httpS://www8.somedomain.unknowntld'), ('http://mail.office.somedomain.unknowntld'),
('mail.office.somedomain.unknowntld');
SELECT url, dbo.GetBaseDomain(url) as 'BaseDomain', dbo.Getsubdomain(url) as 'Subdomains' from #testurls;