• Directory listing under apache

    Some servers have a very strict web server configuration, where directory listing is not allowed. If you have no access to any configuration you that does not matter, you can simply add an .htaccess file into your directory you wish to have directory listing and write the following line into it.

    Options +Indexes

    That’s it.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • Facebook
    • TwitThis
    • LinkedIn
    • del.icio.us
    • MisterWong
    • Furl
    • Reddit
    • email
    • Webnews
    • Digg
    • StumbleUpon
     
  • Perian – Video Codecs for the Mac

    I recently bought an iMac and as I use it I love it more and more. I learn a lot of new stuff that I also want to share with you. So I will start a new Category that is called MACHELP. Get ready for the first tip.

    I have a lot of home videos I filmed with my Digital Hi8 camcorder and after editing I encoded most videos in xVid. So I wanted to watch those videos on my new iMac. Apparently there is no out of the box playing that kind of videos on a Mac, so I had to search for something I also knew from the PC-World. I needed a codec pack for video and audio to playback.

    And I didn’t had to search long, I found one Codec Pack that fits my needs on the official Apple site. It is called Perian, it’s free and it works quite well.

    http://www.apple.com/downloads/macosx/video/perian_christopherforsythe.html

    So if you have any probelms with video or audio playback try Perian. If you know another one, feel free to post a comment.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • Facebook
    • TwitThis
    • LinkedIn
    • del.icio.us
    • MisterWong
    • Furl
    • Reddit
    • email
    • Webnews
    • Digg
    • StumbleUpon
     
  • Setting up a Subversion Repository

    This little tutorial for setting up a svn repository on a linux box is for all the new developers out there. It doesn’t matter if you are coding in in C++, Rails, PHP or what so ever. For other docs its also a good thing to have them versioned, so you don’t have to save several copies of your docs in ordinary folders. The differences of two Microsoft Word documents for example can be viewed in Word too.

    Read the rest of this entry »

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • Facebook
    • TwitThis
    • LinkedIn
    • del.icio.us
    • MisterWong
    • Furl
    • Reddit
    • email
    • Webnews
    • Digg
    • StumbleUpon
     
  • Scratching the surface of Ruby – Variables and methods

    In my sparetime I am learning Ruby on Rails right now and I want to start a little series about some things that helped me understand that programming language. So lets start with the first episode.

    You are new to Ruby ( on Rails ) and wonder what those different looking symbols for variables and methods in Ruby mean?

    @name,  name,  self.name

    or

    def self.foo,  def foo

    What’s the difference and why does it seem like no one else is being confused by this stuff. That stuff doesn’t seem to be explained well anywhere: So here I wanna try to explain it from all I figured out so far from so many different websites.

    def self.foo is a class method. For example like:

    class User …
    def self.login(…)
    login = User.login(…)
    end

    whereas
    def foo is an instance method named foo.

    @foo is used inside a class definition to mean “foo variable”
    self.foo means “calling foo method” of this object.
    The confusion may come from the fact that instance variables and getter methods have the same name.
    Remember that an instance variable is always prefixed by ‘@’. Anything else is a method call.
    Another subtle place to get confused is a local variable. Suppose we have:

    def foo
    cow = 1
    end

    What is cow? It is a local variable. cow will exist until foo returns. Actually… that gets confusing too. Because Ruby has closures. Lets not think about that just yet.
    An instance variable @foo will live as long as the object does. A local variable foo lives as long as the function does.

    That’s pretty much it for the first episode.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • Facebook
    • TwitThis
    • LinkedIn
    • del.icio.us
    • MisterWong
    • Furl
    • Reddit
    • email
    • Webnews
    • Digg
    • StumbleUpon