published by Zorchenhimer on Mon, 09/19/2011 - 21:39
Cryptography has always been an interesting subject for me. Never really did much coding that involved it however. A little while back someone had asked for help writing a program that performs an Auto Key Cipher, so I figured I'd try my hand at making a proper cipher. I wrote two versions. One DLL, class based written in C# (with GUI). The other procedural based in Perl.
published by Zorchenhimer on Thu, 04/07/2011 - 16:03
So I've always wanted to make a script that read an image, and spat out ASCII art of that image. A few semesters back I wrote one, and I figured I'd share it here.
#!/usr/bin/perl -w
use strict;
use GD;
## Open the image, and get its size
my $src = GD::Image->newFromPng('src.png', 1)
or die('Failed to open image: '.$!);
my ($swidth, $sheight) = $src->getBounds();
## Print out the html header
open OUT, '>out.html';
print OUT qq#<!doctype><html><head><title>ASCII Art</title>
published by Zorchenhimer on Thu, 03/31/2011 - 15:02
For some reason I really enjoy coding mathematical equations. This little script will graph a sine wave, and display some info on the wave as well. Here's some of the images it produced: