Skip to content

Instantly share code, notes, and snippets.

View ciekawy's full-sized avatar

Szymon Stasik ciekawy

View GitHub Profile
@ciekawy
ciekawy / windows-init-unified.ps1
Created March 2, 2026 14:29
WEB-9: Unified Windows Server 2022 init script (network + packages + SSH + .NET)
# Windows Server 2022 Unified Init Script - WEB-9
# Run in Administrator PowerShell after fresh Windows install
#
# Usage: irm <tinyurl> | iex
#
# This script handles the complete post-installation setup:
# 1. VirtIO network driver (if CD drive mounted)
# 2. DNS configuration
# 3. Chocolatey + packages (.NET SDK, Git, PowerShell 7)
# 4. OpenSSH Server with key-based authentication
@ciekawy
ciekawy / sshd_config_simple
Created March 2, 2026 14:06
WEB-9: Simple sshd_config without PowerShell subsystem
# Simple sshd_config for Windows Server 2022
# WEB-9 - SSH setup (no PowerShell subsystem)
# Authentication
PubkeyAuthentication yes
PasswordAuthentication no
# Authorized keys file for administrators
Match Group administrators
AuthorizedKeysFile C:/ProgramData/ssh/administrators_authorized_keys
@ciekawy
ciekawy / sshd_config_minimal
Created March 2, 2026 14:03
WEB-9: Minimal sshd_config for Windows Server 2022
# Minimal sshd_config for Windows Server 2022
# WEB-9 - SSH setup
# Authentication
PubkeyAuthentication yes
PasswordAuthentication no
PermitRootLogin no
# Authorized keys file for administrators
Match Group administrators
@ciekawy
ciekawy / windows-ssh-only.ps1
Created March 2, 2026 13:52
WEB-9: SSH-only setup for Windows Server 2022
# WEB-9: SSH Setup Only (for when main script fails)
# Run these commands one by one in PowerShell as Administrator
Write-Host "Installing OpenSSH Server..." -ForegroundColor Cyan
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Write-Host "Starting SSH service..." -ForegroundColor Cyan
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
@ciekawy
ciekawy / windows-setup-fixed.ps1
Created March 2, 2026 13:48
WEB-9: Windows setup script (FIXED - handles PATH refresh)
# Windows Server 2022 Setup Script - WEB-9 (FIXED)
# Handles PATH refresh and service startup correctly
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072
Write-Host "Installing Chocolatey..." -ForegroundColor Cyan
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Write-Host "Installing packages..." -ForegroundColor Cyan
@ciekawy
ciekawy / windows-network-ssh.ps1
Created March 2, 2026 13:42
WEB-9: Quick network DNS configuration for Windows VM
# WEB-9: Network + SSH Key Quick Setup
# Run after VirtIO network driver is installed
Write-Host "Configuring DNS..." -ForegroundColor Cyan
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("8.8.8.8","8.8.4.4")
Write-Host "Testing connectivity..." -ForegroundColor Cyan
Test-NetConnection 8.8.8.8
Write-Host "DNS configured! Now run the full setup:" -ForegroundColor Green
@ciekawy
ciekawy / windows-setup-web9.ps1
Created March 2, 2026 13:33
WEB-9: Windows Server 2022 automated setup script (SSH + .NET SDK + Git)
# Windows Server 2022 Setup Script - WEB-9
# Quick setup for SSH + .NET SDK + Git
# Run in Administrator PowerShell
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072
Write-Host "Installing Chocolatey..." -ForegroundColor Cyan
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
$env:PATH = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
@ciekawy
ciekawy / A. DBRX.md
Created April 19, 2024 15:43
casual LLM Clash - evaluated responses

Client-Side Encryption:

To implement client-side encryption, we will use the Web Crypto API for encryption and decryption operations. We will ensure that the backend never has access to the plaintext data or encryption keys. First, let's create a function to generate a secure encryption key using the Web Crypto API:

async function generateEncryptionKey(): Promise<CryptoKey> {
  // Generate a new AES-GCM key
  const key = await crypto.subtle.generateKey(
    {
      name: "AES-GCM",
@ciekawy
ciekawy / index.html
Created April 3, 2017 23:46 — forked from d3noob/.block
Simple d3.js Tree Diagram with styling
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Collapsible Tree Example</title>
<style>
.node circle {
@ciekawy
ciekawy / .block
Last active April 3, 2017 22:38 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0