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 / MBUnit to NUnit.md
Last active March 13, 2017 08:19
MBUnit <-> NUnit migration cheat sheet.

This is a cheat sheet I prepared when testing migrations between MBUnit and NUnit. It only covers the areas we used so it's far from complete. It should give a good head start though.

MBUnit NUnit
[FixtureSetUp] [OneTimeSetUp]
[Row] [TestCase]
[Factory] [TestCaseSource] for test cases, [ValueSource] for individual parameters
[Column] [Values]
[SequentialJoin] [Sequential]
[CombinatorialJoin] [Combinatorial]

Keybase proof

I hereby claim:

  • I am ssg on github.
  • I am ssg (https://keybase.io/ssg) on keybase.
  • I have a public key whose fingerprint is A029 1A44 1FB2 44F4 ADCF 2825 E160 28ED A51F 918E

To claim this, I am signing this object:

@ssg
ssg / .gitignore
Created November 15, 2014 16:57
Minimal .gitignore for Visual Studio 2013
*.suo
*.user
bin/
obj/
_NCrunch*/
packages/
*.ncrunch*
*.nupkg
*.psess
*.vspx
@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 / gen_ngen_pdb.ps1
Created December 7, 2014 17:23
Native symbol downloader script
# this was copied from: http://knagis.miga.lv/gen_ngen_pdb.txt
# the only thing to change - the symbol path
$symbolPath = 'c:\Other\Symbols'
# if your Windows is not installed in C:\Windows you also have to revisit the rest of the script to accomodate that
function DownloadFile([string] $url, [string] $target)
{
if ([System.IO.File]::Exists($target)) { return $true }
@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 / 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
@ssg
ssg / rcopy.dpr
Created August 20, 2016 21:28
Recovery Copy - Tool to copy a file ignoring read errors
program rcopy;
{$APPTYPE CONSOLE}
uses
Windows, Classes, SysUtils;
procedure abort(s:string);
begin
writeln(s);
@ssg
ssg / global.dpr
Created August 20, 2016 21:39
Runs a given command in all subdirectories (a la 4DOS/NDOS/4NT)
program global;
{$APPTYPE CONSOLE}
uses
Windows, SysUtils;
procedure abort(s:string);
begin
writeln(s);