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 / 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;
@ssg
ssg / bmpdump.pas
Created September 6, 2024 21:04
A tool I coded back in early 1990's to see the structure of a BMP file
{ BMP Header Dumper }
uses Objects,XIO,XTypes;
(*
type
TBitmapFileHeader = record
bfType: Word;
bfSize: Longint;
bfReserved1: Word;
bfReserved2: Word;
@ssg
ssg / damn.pas
Created September 6, 2024 20:58
My experiment on doing a binary tree based DB system instead of B-trees
{
Name : DAMN! 1.00a
Purpose : Dynamic Architectured data ManagemeNt
Date : 25th May 94
Coder : SSG
Update Info:
------------
25th May 94 - 02:00 - Starting at start...
}
@ssg
ssg / modlist.pas
Created September 6, 2024 20:56
Module lister for FatalVision and other GenSys source code
{ Module Lister 1.00 - (c) 1994 SSG }
uses Debris,Dos,Objects,XIO,XStream;
type
TModuleHeader = record
Name : string[20];
Coder : string[20];
Date : string[11];
Time : string[5];
@ssg
ssg / notes.pas
Created September 6, 2024 20:53
some random coding notes from 1990's
{
topic = Objects in resources
problem = Realizing object
store is easy but the most diffucult part is to load it...
How will I know the object's type I read from stream...
and how will I call the proper object's load constructor????
}
{
@ssg
ssg / xvoc.pas
Created September 3, 2024 20:33
Some VOC processing code I wrote in the 90's
{
Name : X/VOC 1.00a
Purpose : Sound Blaster interface routines
Date : 29th May 94
Time : 19:18
}
unit XVoc;
interface
@ssg
ssg / linkedin-ubo-filter.txt
Created November 5, 2023 11:17
Custom uBlock Origin filter for LinkedIn news feed
www.linkedin.com##:xpath(//span[contains(text(), 'Promoted') or contains(text(), 'Suggested') or contains(text(), 'Recommended for you')]/ancestor::div[@class='relative'])
@ssg
ssg / prog.sh
Last active August 31, 2023 21:46
APT style progress bar
#!/bin/bash
# progress bar function
prog() {
local w=80 p=$1; shift
# create a string of spaces, then change them to dots
printf -v dots "%*s" "$(( $p*$w/100 ))" ""; dots=${dots// /\#};
# print those dots on a fixed-width space plus the percentage etc.
printf "\r\e[K|%-*s| %3d %% %s" "$w" "$dots" "$p" "$*";
}
# test loop