Example for CSS cross-browser gradient

.gradient{
background:#FEF0C3;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FEF0C3', endColorstr='#FFFBED');
background-image: linear-gradient(bottom, rgb(255,251,237) 0%, rgb(254,240,195) 72%);
background-image: -o-linear-gradient(bottom, rgb(255,251,237) 0%, rgb(254,240,195) 72%);
background-image: -moz-linear-gradient(bottom, rgb(255,251,237) 0%, rgb(254,240,195) 72%);
background-image: -webkit-linear-gradient(bottom, rgb(255,251,237) 0%, rgb(254,240,195) 72%);
background-image: -ms-linear-gradient(bottom, rgb(255,251,237) 0%, rgb(254,240,195) 72%);
background-image: -webkit-gradient(
	linear,
	left bottom,
	left top,
	color-stop(0, rgb(255,251,237)),
	color-stop(0.72, rgb(254,240,195))
);
}

A handy tool for generate CSS3 gradients.

The way I like to write modular code in javascript

var MyModule = (function(module) {
  var _privateMethod = function() {
      alert('I am private method.');
  }
  module = {
    'init': function(opt) {
        alert('Hello '+opt['subject']+'!');
    }
  }
  module.Sub = {
    'init': function() {
        alert('I am a sub module.');
        _privateMethod();
    }
  }
  return module;
})(MyModule || {});

MyModule.init({
    'subject': 'world'
});
MyModule.Sub.init();

PHP inputs per form submit issue

In the latest version of the PHP that I use (5.3.10) a new security limit has been added. It is controls how many input fields can beĀ in the POST. As I’ve worked on a sytem that is based on more than 2000 input fields per form I had to guess a fix for it.

First, I’ve used a JS snippet to realize how many input fields (checkboxes) I have and than raise the limit up in php.ini but regarding only this project’s host. I’ve added to my php.ini the following lines:

[PATH=/path/to/my/project]
max_input_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000

That’s it.

Of course I had to restart my PHP FastCGI put these changes into live.