mandazi

web development, gaming, sports, life, etc.

Archive for the ‘Web Development’ Category

Creating Static Pages in Ruby on Rails

with 2 comments

Want to create a static page with this type of url like yoursite.com/about for a Rails app? Well I had to just that for an app I am currently building.

Basically it involves a controller and added a route to routes.rb. The first step is to create a simple controller:

class StaticController < ApplicationController
def about
end
end

I called my controller static, but you can call it whatever you want. In the views/static directory I created a simple about.html.erb file with the html:

About

content here


Then in the routes.rb I added the route:

map.static 'about', :controller => 'static', :action => 'about'

And that's basically it. This is a really basic way of creating static pages in Rails. There are definitely more advanced and probably much better ways of dong this. Since I'm just a beginner this is what I did for now.

Written by Amir Sahib

September 2nd, 2009 at 11:35 pm

Posted in Web Development

Tagged with , ,

YouTube plans to stop supporting IE6 – Thank you Google!

without comments

TechCrunch has made my day with this post!

Written by Amir Sahib

July 14th, 2009 at 2:33 pm

WordPress.com Stats plugin not working?

with 2 comments

I have been Google analytics for years now, but I decided to check out the WordPress.com Stats plugin. It had always been installed since the inception of all my sites, but they never worked and I never really cared for it until today. I googling to find a solution and basically my theme was missing the footer function in my footer.php:

That’s all I needed to add and I began see my stats graph exponentially climb.

Hopefully someone else will find this as a solution when googling.

Written by Amir Sahib

June 16th, 2009 at 6:13 pm

Posted in Web Development

Tagged with , ,

300+ Free Programming Books

with one comment

Excellent resource.

Written by Amir Sahib

May 12th, 2009 at 4:51 pm

Rounded Corners Image Generator

without comments

This is pretty cool.

Written by Amir Sahib

May 6th, 2009 at 11:04 am

IE8 to be distributed on Automatic Updates (Adios IE6,IE7!)

with 2 comments

Starting on or about the third week of April, users still running IE6 or IE7 on Windows XP, Windows Vista, Windows Server 2003, or Windows Server 2008 will get will get a notification through Automatic Update about IE8. This rollout will start with a narrow audience and expand over time to the entire user base. On Windows XP and Server 2003, the update will be High-Priority. On Windows Vista and Server 2008 it will be Important.

Source

I just really hope all the IE6 users accept this update!

Written by Amir Sahib

April 13th, 2009 at 10:23 am

Halal Tunes is up!

with 3 comments

I just launched another one of my sites, halaltunes.com, which happens to be my first site built from scratch using a Flash MP3 player. The Flash MP3 player uses php to search a directory for all mp3 files. It uses the mp3′s file artist name and track title as the info for it’s playlist. This is different then most of the XML Flash MP3 players making the user have to enter all that info. This makes it easy, because all I have to do is upload the directory of MP3s.

I also used jQuery JS to handle the menu. It basically does an AJAX call depending on what the user selects and tells the flash player to go to the directory the user selected. It was pretty simple to write up.

This is just the beginning. I hope to add more features in the future. Your suggestions and comments are welcome.

Written by Amir Sahib

April 9th, 2009 at 1:18 pm

New website for MCC in Silver Spring launched

with 2 comments

I built this new website for a mosque in Silver Spring. Check it out here. It’s using WordPress and a free theme that I found that was hacked to fit their needs.

Still needs some minor tweaking.

Written by Amir Sahib

March 26th, 2009 at 10:45 pm

IE8 is here, now put IE6 to rest!

with one comment

So today Microsoft released IE8. This is good news for all those IE users (which is only about half the users online). Unfortunately many people are still using IE6. I understand some companies require it but IE 8 is out now and I’m almost positive your software can work on IE 7. If the software you are using doesn’t work on IE7, then the you should question those in charge of providing the software.

As a web developer, accommodating IE6 is really annoying and at times painful. We still do this for our clients sine almost 25% of the users worldwide are using IE6. This was understandable but by now many of them should upgrade to at least IE7. So if your company is still using IE6, please for the sake of all the web designers and developers around the world, put it to rest!

Written by Amir Sahib

March 19th, 2009 at 6:26 pm

One year at my current job

with one comment

Time really flies.  I still feel that I’m new in the working world.  Last year this time I began my first professional job right after graduating with my bacehlor’s.  Many people say it’s all about the money, which is true, but it’s also about the environment and the people.  The company I work for has a really great atmosphere and the culture is very laid back and relaxing.  Compared to my family and friends and hearing them complain about their jobs, I am thankful to God that I have such a great bunch of co-workers.

On top of that, the amount of knowledge that I have gained with working with jQuery, basic PHP development and working with the companies framework is priceless.  It has helped me with many of my personal projects and helped my sites grow greatly.

I look foward to continuing my growth and increasing my knowledge. 

I wonder if anyone from my work will actually read this, haha.  Holla if you do!

Written by Amir Sahib

March 10th, 2009 at 4:20 pm