This is a neat little “trick” to prepend something simple to the beginning of a file. Linux is funny in the way that you can easily append to a file by using echo “append me to the file” >> FILE but theres no real simple way to prepend. Most snippets I’ve seen use a tmp [...]
More
We all know that a picture is worth 1,000 words. We also know that programmers are lazy and typing comments is boring. After reading the following post about “comments from a madman” on Worse Than Failure I started to realize the pure genius of it all.
Here are 3 “descriptive comments” for use whenever you [...]
More
Found this while looking for something that isn’t this. It will take a normal string and convert it into numbers. There really is no point to it, I think it was written years ago as a learning exercise or because I was really bored. Anyways, I converted it really fast to a shell script instead [...]
More
I keep finding fun scripts the more I look around. This one is from about a year ago, I used it in a small project so it isn’t the greatest. Regardless, it is very lightweight and is pretty flexible. It doesn’t include all that CRUD admin mumbo-jumbo because I’m being lazy, but it can be [...]
More
Found this while hunting for a file. It’s an old submission to the 99 bottles of beer website. I don’t think they ever posted it, but it was just a fun way to kill time.
Source
#!/usr/local/php5/bin/php
<?
foreach(range((is_numeric($argv[1]) ? $argv[1] : 99),1,1) as $number)
printf(
“%1\\$d bottle%3\\$s of beer on the wall,
%1\\$d bottle%3\\$s of beer.\\nTake one down, pass it around,
%2\\$d [...]
More
I was bored the other day and on the phone or on IM, something. I had a stupid idea to write a script that just annoys the hell out of people via PHP’s Mail function. Its basically useless and I’m not trying to promote pissing off your friends — but here it is.
Usage
Save the annoy_friends.php [...]
More
What is Colibri? It’s the closes thing to Quicksilver you can get for the PC, and it makes life easy when you hate using the mouse. (If you read my quicksilver post you’d realize that id do everything via keyboard if I could…)
My few gripes with Colibri is the fact that it had no way [...]
More
MOVED: http://ubrio.us/plugins
Relative Digg Wordpress Plugin – Add related digg story links to the bottom of your post based on keywords
Note (5/13/07):
I just looked over this code and I made a lot of mistakes. Just use it as an example/reference or clean it up. I hacked it together pretty quick when I was bored at work, [...]
More
I’m no longer supporting this, and I’m unsure if the old YouTube API is still in place.
Download
Usage
Features
Change Log
Hey all, I was asked to write a simple plugin that will make use of the YouTube API to generate videos based on specific post tags.
Downloads
YouTube Wordpress Plugin
svn export http://public.svnme.com/youtubevideos .
Usage
open the .PHP file in a text editor, [...]
More
This is a simple effect that looks pretty awesome and can definatly make your blogging life much easier. (how? because you will never have to type “target=_blank” again, thats how.)
Heres the JavaScript includes
src=”/jslib/prototype.js”
src=”ubrious.js?domain=blog.ubrio.us”
or
src=”ubrious.js?domain=<?=$_SERVER['SERVER_NAME']?>”
And the JavaScript itself
Event.observe(window, ‘load’, function()
{
domain = ”;
$A(document.getElementsByTagName(”script”)).findAll( function(s)
{
domain = s.src.match(/ubrious.js(?.*)?$/);
if(domain)
domain = domain[1].replace(/?domain=/, ”);
});
$A(document.getElementsByTagName(’a')).each(function(l)
{
if(l.target==”_blank” || !l.href.match(’/'+domain+’/') && !l.href.match(/^javascript/))
{
// attach if outside of your [...]
More