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 / 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 November 6, 2025 06:22
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
@ssg
ssg / firefox_edge_smooth_scroll.md
Created January 10, 2023 23:06
Edge-like Firefox smooth-scroll settings for mouse wheel

set these in about:config

setting value
general.smoothScroll true
general.smoothScroll.msdPhysics.enabled false
general.smoothScroll.mouseWheel true
general.smoothScroll.mouseWheel.durationMaxMS 400
general.smoothScroll.mouseWheel.durationMinMS 400
general.smoothScroll.pages.durationMaxMS 500
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Text.RegularExpressions;
namespace RegexVsToCharArray;
[MemoryDiagnoser]
public class MemoryBenchmarker
{
static readonly string[] names = { "Plague Tale", "Callisto Protocol", "God Of War", "Street Fighter 6", "Elden Ring" };

openpgp4fpr:0eca4e59f87479ecc514d5e017c60c1c1381453d

@ssg
ssg / stepper.txt
Created October 3, 2021 23:57
Stepper data from the comments at https://vimeo.com/111417458
Sub78820
Writes a value (param1 | param0) to field 10
Writes a constant (0x910200) to field 0
Spins until (field_4 & 3) == 2
Sub78848
Writes parameter 0 to field 10
Writes parameter 1 to feild 14
Writes a constant (0xA10200) to field 0
Spins until (field_4 & 3) == 2
@ssg
ssg / scf.pas
Created September 20, 2021 19:33
My attempt at a concurrent floppy disk formatter. I don't think this works though. I'm not even sure if it's possible with NEC's FDD protocol.
{ SSG's Concurrent Formatter 0.1 beta }
{$M $800,0,0}
uses
Dos,XStr,Disk,XIO;
type
@ssg
ssg / ssgkey.pas
Created September 20, 2021 19:31
Some keyboard handler I wrote. I don't remember why I started writing this.
{ SSG's Keyboard Handler - (c) 1995 SSG }
{$M $400,0,0}
uses Dos;
begin
asm
jmp @Init
@InstallText:
db 'SSG''s Keyboard Handler Version 1.00a - INSTALLED',13,10,'$'
@Old9: