Skip to content

Instantly share code, notes, and snippets.

View UsmanSabir's full-sized avatar

Usman Sabir UsmanSabir

View GitHub Profile
@UsmanSabir
UsmanSabir / WindowsTerminal.md
Created August 15, 2024 16:37 — forked from dahlsailrunner/WindowsTerminal.md
Customization and Setup notes for Windows Terminal
@UsmanSabir
UsmanSabir / SelfSignedCerts-IIS.md
Created August 13, 2024 10:50 — forked from dahlsailrunner/SelfSignedCerts-IIS.md
Selfsigned certs in IIS from PowerShell

Create Authority

New-SelfSignedCertificate -DnsName "KnowYourToolset Cert Authority" -CertStoreLocation "Cert:\LocalMachine\My" -KeyUsage CertSign,CRLSign

Creates root authority with permission to sign stuff

Export-Certificate -Cert Cert:\LocalMachine\My\<CERTHUMB> -FilePath kytroot.cer

Trust Authority

Import-Certificate -FilePath .\kytroot.cer -CertStoreLocation Cert:\LocalMachine\Root

@UsmanSabir
UsmanSabir / Local-Kubernetes.md
Created August 13, 2024 10:48 — forked from dahlsailrunner/Local-Kubernetes.md
Helpful tips and snippets for Kubernetes within Docker Desktop

Using the K8s Dashboard Locally

Actual repo is here: https://github.com/kubernetes/dashboard

1. Install the Dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml

2. Create a Sample User Account that can Access the Dashboard via Token

kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb6259b66c08a70d0908283f/raw/5727723217e2df4b65d8933adf04d009cfb0fe3f/local-dashboard-account.yml
@UsmanSabir
UsmanSabir / embedded-file-viewer.md
Created May 4, 2023 12:43 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@UsmanSabir
UsmanSabir / dotnetlayout.md
Created October 11, 2022 06:56 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@UsmanSabir
UsmanSabir / UDPer.cs
Created September 5, 2018 12:43 — forked from zmilojko/UDPer.cs
C# sends and receives UDP broadcasts
using System;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
namespace UDPer
{
class UDPer
{