Skip to content

Instantly share code, notes, and snippets.

@eugrus
eugrus / excel2json.py
Last active July 28, 2025 15:24
Platzhalter anhand einer Tabelle füllen
import pandas as pd
pd.read_excel('PH.xlsx').to_json('PH.json', orient='records', indent=4, force_ascii=False)
@eugrus
eugrus / 1a.ps1
Created July 18, 2025 08:42
Replace double paragraph breaks with single ones in an open MS Word document.
# Скрипт для замены двойных переводов абзаца на одинарные в открытом документе MS Word
# Функция для подключения к Word
function Connect-ToWord {
try {
# Попытка подключиться к уже запущенному экземпляру Word
$word = [System.Runtime.InteropServices.Marshal]::GetActiveObject("Word.Application")
Write-Host "Interop connection..." -ForegroundColor Green
return $word
}
rpm2cpio $1 | cpio -idmv
javascript:document.querySelectorAll('*').forEach(el => {const color = getComputedStyle(el).color; const rgb = color.match(/\d+/g);if (rgb && rgb.length === 3) {const [r, g, b] = rgb.map(Number);if (g > r + 30 && g > b + 30) {el.style.color = 'blue';}}});
#!/usr/bin/pwsh
param ([double]$netto)
$brutto = $netto*1.19
Write-Output ("{0:F2}" -f $brutto)
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10003-10041.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10004-10143%20(C06932208).pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10004-10143.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10004-10156.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10004-10213.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10005-10321.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10006-10247.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10007-10345.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10009-10021.pdf
https://www.archives.gov/files/research/jfk/releases/2025/0318/104-10009-10222.pdf
param(
[string]$filePath
)
# Ensure the file exists
if (-not (Test-Path $filePath)) {
Write-Error "File does not exist: $filePath"
exit 1
}
javascript:window.location.pathname=window.location.pathname.replace(/^\/[a-z]{2}-[a-z]{2}\//,'/en-us/');
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::PrimaryScreen.Bounds
[System.Console]::CursorVisible = $false
Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action {
[System.Console]::CursorVisible = $true
} | Out-Null
$width = 10
$height = 20
$script:field = New-Object 'object[]' $height
for ($i = 0; $i -lt $height; $i++) {