Skip to content

Instantly share code, notes, and snippets.

View ssg's full-sized avatar
💾
restoring

Sedat Kapanoğlu ssg

💾
restoring
View GitHub Profile
@ssg
ssg / lwx.pas
Created August 25, 2011 20:06
ListWorx - BBS shopping list generator
{ List Selector - (c) 1995 SSG
"it's a nice day to debug" /SSG
news:
-----
19th Jan 96 - 00:21 - added modified check...
21nd May 96 - 04:20 - fixed sort bug...
17th Mar 97 - 03:24 - added wizcat format...
}
@ssg
ssg / newexe.pas
Created August 25, 2011 20:08
NewExe header structure
{ NewExe implementation }
unit NewExe;
interface
const
NESign = $454e;
@ssg
ssg / scf.pas
Created August 25, 2011 20:13
Background floppy formatter
{ SSG's Concurrent Formatter 0.1 beta }
{$M $800,0,0}
uses
Dos,XStr,Disk,XIO;
type
@ssg
ssg / lowercase.ps1
Created August 25, 2011 21:01
Convert all filenames in current directory to lowercase
gi * | % { ren $_.Name $_.Name.ToLower() }
@echo off
rem this converts a recorded gource ppm stream along with a mp3 soundtrack to a youtube compatible format
rem with decent quality and file size
rem usage: ppm2youtube <ppmfile> <mp3file> <outputfile>
set FFMPEG_DIR=d:\ffmpeg
%FFMPEG_DIR\bin\ffmpeg -y -f image2pipe -vcodec ppm -i "%1" -i "%2" -map 0 -map 1 -c:v libx264 -c:a libvo_aacenc -preset slow -pix_fmt yuv420p -threads 8 -bf 0 "%3"
@echo off
rem this creates a youtube compatible ppm stream for ffmpeg with gource
rem usage: gource4youtube <ppmfile> <logofile> <bgcolorhex>
set GOURCE_DIR=d:\gource
%GOURCE_DIR%\gource -1280x720 -s 0.01 --colour-images -r 30 --stop-at-end -o "%1" --max-files 0 --logo "%2" --user-scale 1.5 --highlight-users -b %3 --hide filenames
@ssg
ssg / turkishid.r
Last active March 28, 2016 00:52
turkish id validation in a tweet attempt in R language
tc<-function(n){
v<-as.numeric(strsplit(n,"")[[1]])
s<-sum
v[1]>0&v[10]==(s(v[c(1,3,5,7,9)])*7-s(v[c(2,4,6,8)]))%%10&v[11]==s(v[1:10])%%10}
@ssg
ssg / validate.js
Last active March 28, 2016 06:11
Turkish ID Validator in a Tweet Attempt
function validate(n){n=[].map.call(n,Number);o=n[0];c=n[9];t=10;if(o){o+=n[2]+n[4]+n[6]+n[8];e=n[1]+n[3]+n[5]+n[7];};return!((7*o-e+t)%t-c|((o+e+c)%t)-n[t]);}
@ssg
ssg / log2html.c
Created April 13, 2016 17:47
Converts custom IRC log snippets to HTML. Probably the first app I wrote that worked with HTML, and interestingly, in C. (December 1997)
#include <stdio.h>
char indexheader[] =
"<!-- Generated by LOG2HTM by SSG/aRtEffECt --> \n \
<body bgcolor=\"#000000\" text=\"#FFFFFF\" link=\"#C9C298\" vlink=\"#808080\" alink=\"#FF0000\"> \n \
<h1>Best of #coders</h1><font size=\"+1\" color=\"#7a8daf\"> \n \
All those are selections from SSG''s log of #coders on irc.raksnet.com.tr. \n \
</font><center><table align=\"center\" bgcolor=\"#695852\" cellspacing=1 cellpadding=4> \n \
<tr bgcolor=\"#000000\"><th>Title</th><th>Date</th></tr>\n";
@ssg
ssg / gondol.tcl
Created April 13, 2016 18:05
Quiz bot for XiRCON that used no central DB but relied on people for questions and correct answers (circa 2001)
# gondol.tcl - particularly quiz bot
# idea by teo - code by ssg
set users ""
set question ""
set qowner ""
set answers {}
set qtime 0
set stopping 0
set phase 0