Skip to content

Instantly share code, notes, and snippets.

View ssg's full-sized avatar
馃暐
loading

Sedat Kapano臒lu ssg

馃暐
loading
View GitHub Profile
@ssg
ssg / agg.dpr
Created March 3, 2026 21:50
Some log file analysis tool I wrote back in 2003
program agg;
{$APPTYPE CONSOLE}
uses
IniFiles, SysUtils;
procedure Abort(s:string);
begin
writeln(s);
@ssg
ssg / tables.css
Created March 3, 2026 04:38
Proper headerless table rendering for Obsidian - courtesy of Reddit user u/null_entity_75
/* Live Preview: Hide header only if 1st or last cells contain nothing but a <br> */
.cm-table-widget:not(.has-focus) thead:has(th:first-child > .table-cell-wrapper > br:only-child):has(th:last-child > .table-cell-wrapper > br:only-child) {
display: none !important;
}
/* Reading Mode */
.markdown-rendered thead:not(:has(th:not(:empty))) {
display: none;
}
@ssg
ssg / basldr.bas
Created March 2, 2026 06:04
BASIC color cycling intro I made in 1989
10 MODE 0
20 BORDER 0
30 FOR f=0 TO 13:INK f,0:NEXT:g=0:i=1:G=INT(RND*5)+1
40 FOR f=148 TO 230 STEP 2
50 g=g+1:IF g=1 THEN g=0:i=i+1:G=INT(RND*5)+1:IF i=13 THEN i=1
60 MOVE 160-(6*16),f:DRAWR 640-(8*16),0,i
70 NEXT:PL=0
80 INK 15,25:GOSUB 190
90 FOR q=15 TO 15
100 FOR r=1 TO 20
@ssg
ssg / meteor.bas
Last active January 29, 2026 00:45
Code listing of Meteor Madness from ZX Computing Dec 84-Jan 85
1 REM *** METEOR MADNESS BASIC LISTING ***
2 REM *** TRANSCRIBED BY SSG 2026 (SSG.DEV) ***
3 REM *** ZX COMPUTING DEC 84/JAN 85 ***
4 REM *** SPECTRUM 48K VERSION ***
10 DATA "F3CDDE7ACD3C7ACD1384"
20 DATA "057BCDC17ACD807A1103"
30 DATA "CD7279CDED792BF21285"
40 DATA "FE1828EBCD1D7A21942"
50 DATA "5D7C352E2CD4579923"
60 DATA "CDFA791807210058936"
@ssg
ssg / convert_bmw_driver_recorder_videos_to_mp4.ps1
Last active December 15, 2025 07:12
PowerShell FFMPEG command to convert all BMW driver recorder dashcam videos to a known container format
# converts all ".ts" MPEGTS videos in current directory and its subdirectories to .MP4 container format
# it doesn't re-encode the video, uses the original, so the file size remains the same and there is
# absolutely no quality loss.
# if you want to compress your videos (i don't recommend it since that might affect quality) remove the "-c copy"
# parameter and add yours if needed.
dir *.ts -r | % { ffmpeg -i $_.FullName -y -c copy $([System.IO.Path]::ChangeExtension($_.FullName, '.mp4')) }
# high quality, possibly visually not lossy, but still lossy version:
@ssg
ssg / Convert-Mp3ToOpus.ps1
Created July 10, 2025 00:40
PowerShell snippet to convert all your mp3 files in current directory to opus using FFMpeg
dir *.mp3 -r | % { ffmpeg -hide_banner -i $_ -y -ab 256k $([Io.Path]::ChangeExtension($_.Name, ".opus")) }
@ssg
ssg / server.cfg
Created February 3, 2025 06:58
SokSa CS:GO Server Configuration from 2016 or so
rcon_password "[REDACTED]"
hostname "[SokSa] CS:GO Blues!"
sv_broadcast_ugc_downloads 1
sv_broadcast_ugc_download_progress_interval 5
sv_hibernate_ms "20"
sv_hibernate_ms_vgui "20"
sv_hibernate_postgame_delay "5"
sv_hibernate_punt_tv_clients "0"
sv_hibernate_when_empty 0
host_players_show 2
@ssg
ssg / lx.pas
Created September 6, 2024 21:27
My attempt at an executable dumper for new EXE formats introduced with Windows 3.1, OS/2 etc
{ NE Lister }
uses XTypes,Dos,Objects;
var
dirinfo:SearchRec;
T:TDosStream;
H:TEXEHeader;
w:word;
l:longint;
b:byte;
@ssg
ssg / logon.pas
Created September 6, 2024 21:25
An IBM VM/CMS like LOGON screen for DOS
{$M $4000,0,0}
{$G+}
uses xstr,crt,dos;
const
statusx = 64;
log : array[1..9] of string[20] =
(' GGG GGGG',' GGGGGG G GGG',' GGGGGGG G G',
@ssg
ssg / cit.pas
Created September 6, 2024 21:07
OS/2 to Windows Bitmap converter I coded back in 1994
uses GDrivers,XIO,Objects,XTypes;
var
I,O:TDosStream;
BC:TBMPCore;
BX:TBMPExtra;
Quad:QuadPal;
RGB:PalType;
BS:TBMPSimple;
s,d:FNameStr;