Skip to content

Instantly share code, notes, and snippets.

View LaineZ's full-sized avatar

140bpmdubstep LaineZ

View GitHub Profile
@LaineZ
LaineZ / cleancargo.ps1
Created October 22, 2023 08:57
PowerShell: Clean Cargo Projects recursivly
# Change your desired path
$projectFolders = Get-ChildItem -Directory -Path "D:\projects"
foreach ($folder in $projectFolders) {
$projectPath = Join-Path $folder.FullName "Cargo.toml"
if (Test-Path $projectPath) {
Write-Host "Cleaning project in $($folder.FullName)..."
Set-Location -Path $folder.FullName
Invoke-Expression -Command "cargo clean"
@LaineZ
LaineZ / GOG.com Linux OpenGL 2.1 supported games list
Last active May 24, 2021 10:25
This list also includes soundtracks and dlc's - actual game count is lower..
https://gog.com/game/baldurs_gate_2_enhanced_edition
https://gog.com/game/baldurs_gate_enhanced_edition
https://gog.com/game/pyre
https://gog.com/game/baldurs_gate_siege_of_dragonspear
https://gog.com/game/bastion
https://gog.com/game/planescape_torment_enhanced_edition
https://gog.com/game/turok
https://gog.com/game/faster_than_light
https://gog.com/game/legend_of_grimrock
https://gog.com/game/torchlight_ii
taskkill /IM "postgres.exe" /F
@LaineZ
LaineZ / gifenc.bat
Created January 13, 2020 15:10
BAT GIF Encoder (FFmpeg)
:: A small batch adaptation of this script http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
:: USAGE
:: gifenc.bat [inputfile] [outputfile] [xsize] [ysize]
SET palette="palette.png"
SET filters="fps=15,scale=%3:%4:flags=lanczos"
ffmpeg -i %1 -vf "%filters%,palettegen" -y %palette%
ffmpeg -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %2
local ins = {}
FILE = "tmpfile.txt"
CYCLES = 20
function average(inmassiv)
local rezik = 0
for i = 1, #inmassiv do
rezik = inmassiv[i] + rezik