Category: Web Programming

  • Creating an Instance of an Object without Calling Its Constructor in PHP

    Today, I stumbled upon an article in a local PHP developers group. It was about creating an instance of an object without calling its constructor (as mentioned in post title). At first, the idea made no sense to me. Because, constructor method is run every time an object is instantiated, this property is the whole…

  • VirtualBox, Shared Folders and Cache

    I have recently set up a virtual server environment using VirtualBox for quick web development. Using shared folders feature, I wanted to avoid file uploads between VM host and guest. However, when I make request to an updated a file, server responses with the old version. First, I cleared and disabled my browser cache. The…

  • Managing Gunicorn Processes With Supervisor

    Last week, I have written a post about gunicorn applications. We started gunicorn manually, and our application worked. Yay! However, everything is not so great. When (If) the server reboots, gunicorn must be started manually, again. We should find a way to automate this. Actually, there are few ways to accomplish this, such as: init…

  • How to Run Flask Applications with Nginx Using Gunicorn

    We have recently bought a VPS for İTÜ24, the online newsletter of Istanbul Technical University. The server is running on Ubuntu Server 12.04 operating system. Due to limited memory resources and performance concerns, we preferred to setup nginx as web server. Our server will serve several web pages and applications developed in various programming languages,…

  • HTML5 Video Loop Support for Firefox

    You created a fancy HTML5 page with video element but guess what, Firefox 4 does not support video loop. I found a workaround for this problem with javascript.

  • How to Create Hyperlink DIV Elements

    Today, I encountered a problem: making div element a hyperlink. For example: It works, but SHOULD NOT be used. Because it is against the web law: W3C (X)HTML specifications! A very basic (and valid) solution: However my case was a little bit more difficult: We already know that is not a valid layout. Because a…