64 Lines

"useful source code in 64 lines or less"

Are you tired of long code?

Long code can be intimidating for both a novice as well as a professional. Once you add unreadable indentation, lack of comments, and redundant logic - long sections of code can become a nightmare to use and maintain. This website was created to address the long code problem by providing short solutions to common problems. Simply explore our collection of code snips and use them in your own projects.How short is your code?

Why 64 lines?

There are many places on the Internet that publish interesting source code, often much longer than 64 lines - so what drove me to create such a restriction on my code? I was always a minimalist: I use the Linux window manager ion, my source editor of choice is vim, and I use SSH to administer this site. The initial idea for 64 Lines came to me after exploring the code of Ambassador Of Pain, a console game written in under 64 lines. The source code for AOP taught me a few new tricks with if statements and loops, inspiring me to create a minimalist collection of useful source code.

My Developer's Toolkit

Topics

File Formats
Linux
PHP

File Formats

» Decoding JPEG width and height - Decode a JPEG file to isolate its width and height.
» Decoding GIF width and height - Decode a GIF file to isolate its width and height.

Linux

» Find and play multimedia with slocate - Use this bash script to quickly play a selection of multimedia from your hard drive using mplayer and slocate.
» Mount HFS+ Hybrid Fisks - Mount special hybrid Mac disks under linux by manually finding the hidden HFS+ partition on the disk.

PHP

» Create a quick PHP gallery from a directory - Use the PHP source code to instantly create a nice gallery from a directory on your site, why use image hosting services when you can do it yourself?.
 _________________________________________ 
/ 'Cow says: Thank you for visiting. You  \
| are browsing: 64 Lines, useful source   |
| code in just a few lines. You have been |
\ to 1 pages on this site today.'         /
 ----------------------------------------- 
       \   ,__,
        \  (oo)____
           (__)    )\
              ||--|| *

All article content is copyright of Michael Petrov, 2006©.
The source code presented in the articles is distributed as freeware, please feel free to use it in your own projects - both commercial and non commercial.
Valid HTML 4.01 Transitional Valid CSS!