Skip to content

Instantly share code, notes, and snippets.

View boranbar's full-sized avatar

Boran BAR boranbar

View GitHub Profile
@boranbar
boranbar / gist:0a10e78286c5d01e16e5a804c920976d
Last active September 14, 2025 17:26
Plesk - NPM İçinde Sürüm Bazlı PHP Scripti Tetiklemek

package.json dosyasında build satırını aşağıdaki şekilde değiştiriyoruz. 8.3 yazan yere site PHP sürümü ne ise o yazılacak.

{
  "scripts": {
    "build": "PATH=/opt/plesk/php/8.3/bin:$PATH vite build"
  }
}
## Communication Guidelines
### Language
Always respond in English unless explicitly requested otherwise.
### Git Workflow
#### Initial Check
At the start of each conversation, always run:
1. `git fetch` to get the latest remote information
2. `git status` to check the current repository state
@boranbar
boranbar / gist:843d6fdf68f6a73b92994663e9db1ff3
Created July 14, 2025 16:05
PowerShell script to change the default Remote Desktop Protocol (RDP) port on Windows, remove flood protection limits, and automatically configure the Windows Firewall.
# Yeni RDP Port Numarası (gerekirse bu değeri değiştirin)
$NewRdpPort = 42500
Write-Host "🔧 RDP ayarları yapılandırılıyor..." -ForegroundColor Cyan
# 1. RDP Flood limitlerini kaldır
Write-Host "⚙️ Flood limit ayarları kaldırılıyor..." -ForegroundColor Yellow
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "MaxOutstandingConnections" -Value 0 -PropertyType DWord -Force | Out-Null
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "MaxConnectionTimeOut" -Value 0 -PropertyType DWord -Force | Out-Null
@boranbar
boranbar / gist:d3f9eb649d9d490ba94997d6baec7773
Last active July 17, 2025 12:34
PowerShell Script to Modify Password Policy and Create Local Administrator Users
# Parola politikalarını düzenle
secedit /export /cfg "$env:TEMP\secpol.cfg"
(gc "$env:TEMP\secpol.cfg") |
ForEach-Object {
$_ -replace 'PasswordComplexity\s*=\s*\d+', 'PasswordComplexity = 0' `
-replace 'MinimumPasswordLength\s*=\s*\d+', 'MinimumPasswordLength = 0'
} | Set-Content "$env:TEMP\secpol.cfg"
secedit /configure /db secedit.sdb /cfg "$env:TEMP\secpol.cfg" /areas SECURITYPOLICY
@boranbar
boranbar / add-extra-ips.sh
Last active October 30, 2025 15:17
Add extra IPs script
#!/bin/bash
# Root kontrolü
if [[ $EUID -ne 0 ]]; then
echo "❌ Lütfen bu scripti root olarak çalıştırın."
exit 1
fi
# OS tespiti
if [ -f /etc/os-release ]; then