Passenger – mod_rails for Apache04.11.08

So even if you have never set-upped a Rails Application to Production server there is still hope for you. Introducing Passenger a mod_rails for Apache… Make it super simple to deploy apps just like PHP. Check it out over at modrails.com 

Posted in Ruby, Ruby On Railswith 2 Comments →

iPhone Custom Firmware 1.1.404.05.08

Apple iPhone Unlocked 1.1.4 Custom Fimware

I have finally unlocked one of my iPhones, so now it can run on t-mobile. Luckily I have two iPhones one that I mess around with and the other which I do use on a everyday basis. If incase anyone wants to use my custom firmware I created here it is for download, I assume you can put your iPhone into recovery mode and use the custom firmware to get your phone unlocked. Always be aware of you are doing.

Posted in Downloads, iPhone, Mac, Mewith 14 Comments →

PHP Zend Framework – MVC04.01.08

When ever I use the Zend Framework and I want to use the mvc components I always need to create the structure, though it can be a bit of a pain I have wrote a script to speed up that process. The script I wrote will create the mvc framework for you. It downloads a copy of it and uncompresses it. Check it out. on DZone

Posted in Me, PHPwith Comments Off on PHP Zend Framework – MVC

Pownce T-Shirt03.29.08

FernyB Pownce T-Shirt

My Pownce t-shirt has arrived

Posted in Me, Otherwith Comments Off on Pownce T-Shirt

FriendFeed….03.24.08

While I read post by post about FriendFeed I try to ignore it until today, it got me, So I signed up and you know what? friendfeed sucks, I don’t get it… Everyone is raving about it, it just seems to be everywhere you read. It just seems like a jaiku clone with some extensions. So case in point I have an account with friendfeed and there is no point to friendfeed nothing new, nothing original, & nothing creative. It almost seems like friendfeed could be a feature in a social network then it would make better sense.. 

Posted in Me, Uncategorizedwith 1 Comment →

Jonathan Yanez in Toast03.19.08

It has been a long time that since I last did some serious skateboarding, maybe too long. I still continue to skateboard just not that serious about it as some of my friends are. They have taken it to the next level. Take a look at this video of a friend I used to go skateboard with when I was in High School. It’s a cool video.

Posted in Other, Uncategorized, videowith Comments Off on Jonathan Yanez in Toast

PHP Snippet03.08.08

Here is a PHP Snippet I wrote. It’s a cool trick to for calling multiple methods in a much simpler way. Inspired by Ruby’s ActiveRecord.

<?php

interface Member {
	function login($username, $password);
	function update($status);
}

class Base implements Member {
	public function login($username, $password) {
		echo "You will be logged in as: {$username} with Password: {$password}\n";
	}
	
	public function update($status) {
		echo "Your New Status Message is: {$status}\n";
	}
	
	public function __call($method, array $argv) {
		if(preg_match('/^do_*/i', $method)) {
			foreach(explode("_and_", substr($method, 3)) as $k => $v) {
				$param = array();
				foreach($argv[$k] as $value) { $param[] = "'{$value}'"; }
				$param = join(", ", $param);
				$code = '$this->'. $v ."({$param});";
				eval($code);
			}
		}
	}
}


class User extends Base {
	
	public function say_hello($message) {
		echo "Message: {$message} \n";
	}
}


$usr =& new User();

$usr->do_login_and_update(array("username", "password"), array("Hello World"));
# Prints the following:
# You will be logged in as: username with Password: password
# Your New Status Message is: Hello World
#

$usr->do_login_and_say_hello(array("username", "password"), array("Hi how are you?"));
# Prints the following:
# You will be logged in as: username with Password: password
# Message: Hi how are you?
#

$usr->do_login_and_update_and_say_hello(array("username", "password"), array("Hello World"), array("Hi how are you?"));
# Prints the following:
# You will be logged in as: username with Password: password
# Your New Status Message is: Hello World
# Message: Hi how are you?
#

?>

Posted in PHP, Programmingwith Comments Off on PHP Snippet

Ruby Technique: Meta Programming03.02.08

Meta Programming is code that writes code. See the code sample below.
I have made a screencast of this process. View it here

#!/usr/bin/env ruby

class Product
  def initialize(items)
    items.each {|item| Product.product(item) }
  end

  def self.product(item)
    code = %Q{
      def add_#{item}(item)
        @#{item} = [] unless @#{item}
        @#{item} << item
      end

      def display_#{item}s
        @#{item}.each {|item| puts item }
      end
    }
    class_eval(code)
  end
end

class Item < Product
  def initialize(*items)
    super(items)
  end
end

cart = Item.new(:book, :computer, :music)
cart.add_book(:Ruby) # => Add a book to our cart items

cart.display_books # => We want to display All books we have added
puts "\n"

cart.add_computer(:Apple)
cart.add_computer(:Dell)
cart.add_computer(:Sony)
cart.display_computers # => Display All Computers
puts "\n"

cart.add_music(’Modest Mouse‘)
cart.add_music(’Northstar‘)
cart.display_musics # => Display All Music Items

Posted in Programming, Rubywith Comments Off on Ruby Technique: Meta Programming

Mac vs. PC vs. Linux02.28.08

Posted in Revver, videowith Comments Off on Mac vs. PC vs. Linux

Lastbridge – Add Friends Stations/Playlist02.14.08

lastbridge.net new feature
New Feature out now. Add your last.fm friends radio stations and playlist.

Posted in Last.fm, lastbridge.net, Projects, Ruby On Railswith 1 Comment →

Terminator: The Sarah Connor Chronicles02.01.08

In the series premiere, Sarah Connor struggles to keep her son John Connor safe from an enemy Terminator from the future.

A must watch show on hulu.com. It’s cool!

Posted in Other, videowith Comments Off on Terminator: The Sarah Connor Chronicles

Lastbridge Stations01.24.08

Added Playlist

New Feature for LastBridge.net – I have added a small list of station you can now select.

Of course more new features are planned ahead.

Posted in Programming, Projects, Ruby On Railswith 1 Comment →

Release: LastBridge01.20.08

Screencast Lastbridge

It is official LastBridge.net is out for public consumption! Again for those who are lost and don’t know what this “LastBridge” is it’s for listening to your last.fm radio stream on the Roku SoundBridge.I have made a screencast on How To use LastBridge. If anyone still needs help or just want to leave your opinions on this project, leave a comment or two. Thanks.Enjoy!

www.LastBridge.net

Posted in Programming, Projects, Ruby On Rails, videowith 25 Comments →

Development: LastBridge01.18.08

LastBridgeWhat? What is this? Well, yeah… it is another project of mine. I call it LastBridge, like the name? its original… anyways.. So LastBridge is a web app for users of the Roku SoundBridge like myself. Basically you can listen to your last.fm music on the SoundBridge without having to install anything or hosting any files. I previously wrote the same thing in a much cheaper less good looking way, in PHP. This time I have rewritten it using Ruby On Rails. As soon as I release it make sure to check it out.

Posted in Projects, Ruby On Railswith 8 Comments →

Ruby Code Snippet01.13.08

In Ruby a switch statement looks like this

say = "Hello"

case say
when "Hello" then
	puts "Say Hello"
when "Bye" then
	puts "Say Bye"
end

In PHP a switch statement looks like this


Posted in Programming, Rubywith Comments Off on Ruby Code Snippet

  • Recent Comments