Advertisement

Neftaly Hernandez [entries|archive|friends|userinfo]
Neftaly Hernandez

[ website | http://neftaly.com/ ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Simple templates [Apr. 23rd, 2008|12:36 pm]
Extremely simple yet highly effective PHP templating engine.
include.php:
<?
function content($buffer) {
	/* Auto-templating function */ 
	if (@TEMPLATE === false) {
		return $buffer; 
	} else { 
		include "template.php";	
		return $template; 
	}
}
ob_start("content");
?>

template.php:
<?php $template = <<<TEMPLATE
<html>

<head>
<title>title</title>
</head>

<body>
{$buffer}
</body>

</html>
TEMPLATE;
?>
LinkLeave a comment

UPC Barcodes [Mar. 14th, 2008|08:47 pm]
Please note that my main site will be down for a while, and thus none of these examples will work.

UPC barcodes are pretty easy to do in Javascript. This particular script takes a product name and 10 digit UPC barcode, adds a prefix, calculates the checksum and draws it.


UPC.draw("Product Name", "1234567890");

Download UPC.zip here.
LinkLeave a comment

Experiements with <canvas> [Oct. 30th, 2007|10:22 am]
This is a little something I put together as a test of the <canvas> element. It is derived from the aussie game "Puzzle Quest" and requires either FF or Opera. I'll take it down in a few days.
HappyQuest.

The XML driving the map/sprites )
LinkLeave a comment

Guitar effects unit [Feb. 5th, 2007|09:19 pm]
This is a couple of circuits in one - a distortion pedal, a wah-wah, an amplifier and a pre-amp (similar to my last post). It's all powered by a couple of sealed lead-acid batteries. I'll install some speakers and an AC power supply on wednesday, and will finish an external wah-wah pedal shortly after.


I'm trying to get my hands on a few Bakelite knobs and some antique-looking speaker fabric, so that I can get it to look like a 40's era radio.
LinkLeave a comment

Pre-amplifier [Jan. 27th, 2007|08:23 pm]
Here's a pre-amp I recently built - I'm particularly happy about how the case came out.
LinkLeave a comment

Worldbender Editor - what do you think? [Sep. 16th, 2006|11:15 pm]
The Worldbender Editor is an isometric level-editing system written in JavaScript. It's fairly complete, but I really would like some input on the good and the bad. Please, try it out, tell me what you think!
Link6 comments|Leave a comment

Neftaly's magical IE PNG renderer [Sep. 4th, 2006|11:30 am]
Existing PNG Alpha rendering hacks for IE were overly crappy, so I made this.

Code behind the cut )
Link2 comments|Leave a comment

Neftaly's shiny bars [Sep. 3rd, 2006|02:30 pm]
With a little DHTML, slick-looking progress bars are extremely easy to implement.


Visit my examples page
LinkLeave a comment

Neftaly's unreliable window-in-page script [Aug. 16th, 2006|10:00 am]
Neftaly's unreliable window-in-page script - simple dragable DHTML windows (quick example).
NB: This is old code. A cleaner, better-looking version is available on request.

Code behind the cut )
LinkLeave a comment

Cool login form + effect [Aug. 13th, 2006|08:30 pm]
I really like the look of this (mouseOver and mouseOut). Now all I need is something to use it with.
Link2 comments|Leave a comment

Simple anti-XSS/SQL injection in PHP [Aug. 9th, 2006|06:00 pm]
Here's some more code. A nice, quick and effective way of automatically blocking nearly all XSS/SQL injection in PHP (excluding unquoted SQL query strings, which you shouldn't be doing in the first place). It isn't really suitable for all situations, but certainly makes a nice stopgap.

Code behind the cut )
LinkLeave a comment

Neftaly's reliable drag & drop elements [Aug. 1st, 2006|12:00 pm]
Just some simple JavaScript I made for myself, but might as well share around. I was hunting for a decent Drag-and-Drop HTML elements scripts that let me have custom drop zone classes (i.e. round pegs and square holes). I found nothing suitable - while extremely functional, Scriptaculous and Rico are both the size of a small moon. My script is way easier to use, and only 3.5KB (quick example).

Code behind the cut )
LinkLeave a comment

Super awesome bumper 19th birth anniversary day edition [May. 31st, 2006|09:00 pm]
Greetings, people of the Internet. I have not graced you with my presence in a while, and for this I am truly sorry. The rumors you heard were correct: I am now, in fact, 19 years old.

My PS2 )
LinkLeave a comment

Simple Object Access Protocol parody [Mar. 2nd, 2006|10:00 pm]
A totally pointless concept I came up with:

Internet connected soap )
Link1 comment|Leave a comment

More past projects [Feb. 24th, 2006|10:00 am]
What follows is absolute unadulterated self-indulgent crap... but it makes worthy posting material.

Science fair stuff )
LinkLeave a comment

A humanitarian effort of herculean proportions [Feb. 24th, 2006|08:00 am]
The AP was one of my "humanitarian" projects. For the good of the people, y'all!

Medication assistance for the elderly )
LinkLeave a comment

Underwater ROV updates [Jan. 23rd, 2006|06:00 pm]
My submersible hasn't been forgotten (merely piled under loads of work).

A few build notes )
LinkLeave a comment

navigation
[ viewing | most recent entries ]

Advertisement