the p1k3 repository of hack
This is a place for code - scripts, web applications, rc files, BASIC I wrote in highschool. You might find some of these useful. Others are included as historical reference points.
+
Display, et al.
This is the Perl module and associated bits that run the weblog portion of p1k3.com. It's presently in a state of slow flux as I attempt to design a new lightweight markup language and integrate some wiki-like features.
Display currently requires the following modules from CPAN:
- Class::Accessor
- Text::Textile
- Image::Size
- Imager
- XML::Atom::SimpleFeed
It also uses WalaWiki to provide discussion facilities, and runs cleanly under CGI::Fast.
Tarballs and a CPAN distribution coming soon. For now, your best option, if you're interested, would be to look at the Subversion repository.
more: display.tar.gz readme.txt
+
Formicate
some perl to use CGI::FormBuilder
This is far from a general solution to anything, and I'd do it quite a bit differently if I was to start today - at a minimum, I'd switch out HTML::Template for Template Toolkit and go with SQLite for a data store.
That said, this may be a useful example if you're looking at CGI::FormBuilder for quick-and-dirty data collection. It does FastCGI, multi-page persistent forms with flatfile data storage, and a file-upload mechanism. Forms are defined as template / conf file pairs.
Depends on: CGI::Fast, CGI::FormBuilder, HTML::Template, Data::Dumper.
more: formicate.tar.gz readme.txt
+
Mplus
My good friend Levente is a professional stats geek. He uses a package called Mplus to do some kind of numerical voodoo.
Sometimes, Mplus produces output in a human-readable text format. It's pretty, as these things go, but sucks to manipulate unless you really enjoy copy & paste exercises. Here is some Perl to pull out sets of values using regular expressions and dump them to a very simple CSV file.
If this sounds useful, the attached tarball includes some sample configurations.
more: filter_mplus.tar.gz readme.txt
+
QBasic Rockwars
Rockwars is my take on the classic artillery game. It features two little castles, an inexorably advancing tank (with a laser!) and a tiny orbiting moon.
Here's the source. You'd need a working qbasic.exe to run this, although FreeBASIC might do the trick with a little work.
more: rockwars.zip
+
QBasic Trader
Trader is a partial clone of Taipan, the quintessential buy-low-sell-high-fight-pirates game. I started it for a comp.lang.basic.misc retro game competition, because Mike Kessinger told me that Taipan was the best game of all time.
He wasn't far off. If you go off and find a ROM and an Apple II emulator, the original is still addictive as hell. My version is playable, if not exactly fun. I am still fond of the little ship and cannon graphics, and may someday revisit this project.
You can look at the source, or download a zip file of everything. You'd probably need a working qbasic.exe to play this.
more: trader.zip
+
WalaWiki
This runs the wiki here. It was originally written by Brent; I've since rewritten most of the code and added a number of features. Public domain.
Features:
- Standard, simple wiki markup.
- An add-text box at the bottom of each page to encourage discussion and comments.
- Basic cross-referencing of pages, automatic links to popular search engines, comment-system integration with p1k3's Display module.
- Plain old Perl CGI and flat text files - No database required, few external dependencies, integrates easily with other Perl.
- Atom feeds available with XML::Atom::SimpleFeed.
- Aims to output valid XHTML at all times, with a test suite which relies heavily on W3C validation of pages.
- Easily re-styled with CSS.
Changes and bug tracking can be found on my personal installation, at WalaCode. The official home for the project is walawiki.org, where you'll find the most recent source.