Skip to content

Instantly share code, notes, and snippets.

View froschgrosch's full-sized avatar
🚀

froschgrosch

🚀
View GitHub Profile
@froschgrosch
froschgrosch / fixdates.ps1
Created August 17, 2023 20:34
A script for reconstructing the correct time stamp in the explorer from the demo file name
# VQ3 style - demo-\d{8}-\d{6}\.dm_68
# RA3 style - \w*_\d{8}_\d{6}\.dm_68
# Q3E style - \d{14}-\S*-\w*\.dm_68
foreach ($file in Get-ChildItem){
if ($file.Name -match '\w*_\d{8}_\d{6}\.dm_68'){
Write-Output $file.Name
$date = $file.Name.Split('_')
$date = Get-Date -Year $date[1].Substring(0,4) -Month $date[1].Substring(4,2) -Day $date[1].Substring(6,2) -Hour $date[2].Substring(0,2) -Minute $date[2].Substring(2,2) -Second $date[2].Substring(4,2)
@froschgrosch
froschgrosch / formatter.ps1
Created April 1, 2022 14:05
RA3 demo formatter (formerly in froschgrosch/quake3-scripts)
$output = $true
$demoFolder = "$PSScriptRoot\demos"
$minSize = "100kb" #delete demos below size threshold
$reiterateFolder = $true
while ($reiterateFolder) {
$reiterateFolder = $false
$files = Get-ChildItem $demoFolder | Sort-Object -Property Name
@froschgrosch
froschgrosch / software.md
Last active August 16, 2023 11:59
Useful Software I use
@froschgrosch
froschgrosch / rpi_stream_webcam.sh
Created March 9, 2022 12:23
simple script to stream webcam video with vlc
#!/bin/bash
# simple script to stream webcam video with vlc
cvlc v4l2:///dev/video0:chroma=mjpg --http-host="192.168.178.6" --sout '#standard{access=http,mux=mkv,dst=:8080/stream.mkv}'
@froschgrosch
froschgrosch / convert.java
Last active October 9, 2021 14:52
Split int into digits recursively
public String[] toStringArr(int number) {
String[] output = new String[0];
int cl = 0; // currentLength
// Diese Funktion wandelt Integer von 0 bis 999999999 in ein String-Array um
if (number < 0) { // negative Nummer, geht nicht
output = new String[0];
} else if (number <= 20) { // end if (number < 0)
output = new String[1];
output[0] = String.valueOf(number)+".wav";
cl++;