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.
Topics
Command Line
File Formats
Linux
PHP
Tools
Command Line
» Unix shuf command line tool on Mac OS X using PHP - PHP source code for a command line tool that recreates the most basic functionality of the unix shuf shuffle tool that is missing on Mac OS X and other systems.
File Formats
» Decoding the width and height of a GIF file - C++ source code to decode a GIF file to extract its size. The decoder is only 31 lines and includes comments to learn from.
» Decoding the width and height of a JPEG (JFIF) file - C++ source code to decode a JPEG file to extract its size. The decoder is only 31 lines and includes comments to learn from.
Linux
» Mounting HFS+ Hybrid Disks on Linux - Quick tutorial for mounting HFS+ file systems from hybrid disks on Unix/Linux systems.
» Use Linux to search and play multimedia files - Short Bash script to find and construct a playlist based on user supplied keywords. Uses slocate to locate files and mplayer to play them.
PHP
» Create a Quick PHP Gallery with Thumbnail Generation - PHP source code to make a very quick gallery out of images within the current folder. Includes automatic thumbnail generation for optimization of gallery.
Tools
» HTTP Header Tool with a HEX editor style data browser - Inspecting HTTP requests and responses is a vital part of the web developer debugging process. Use the HTTP header tool to inspect your HTTP requests when developing web applications.
All article content is copyright of Michael Petrov, 2012©.
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.

