Date time picker

Date time picker

There are many to choose from. Some offer only date picker, others provide both date and time separately. There are few that combine date and time in one selector such as bootstrap-datepicker by eternicode. You choose which one will work for you:

jQuery native date picker

The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.

Keith Wood iQuery date pick

A jQuery plugin that attaches a popup calendar to your input fields or shows an inline calendar for selecting individual dates or date ranges.

Twitter Bootstrap: An extended date and time picker

Date time picker utilizing Twitter Bootstrap framework. It provides a very neat and user friendly date and time calendar selector through one field/pop up.

Twitter Bootstrap: An extended date picker

Zebra Datepicker, a lightweight datepicker plugin based on jQuery

Zebra_Datepicker is a small, compact and highly configurable datepicker jQuery plugin, meant to enrich forms by adding the datepicker functionality to them. This jQuery plugin will automatically add a calendar icon to the indicated input fields which, when clicked, will open the attached datepicker. Users can easily jump between months and years due to the datepicker’s intuitive interface. The selected date will be entered in the input field using the date format of choice, configurable in the datepicker’s options.


  • small – it weights around 21KB minified
  • compact – unlike other datepickers, this datepicker is one-file only
  • cross-browser – works in every major browser; works also in Internet Explorer 6 where it uses an iFrameShim to stay above select controls
  • default color scheme that blends-in well with almost any design, and it’s easily
  • customizable through the well-organized CSS file; two additional themese are included, one of them being for use with Twitter Bootstrap
  • intuitive interface fast and easy navigation through months and years
  • intuitive mechanism for disabling dates and date ranges using a syntax similar to cron‘s syntax
  • supports defining of custom weekend days for countries that don’t have the weekend on Saturday and Sunday
  • supports most of date formats you can think of, borrowing the syntax of PHP’s date function
  • supports all sorts of combinations for starting and ending dates
    date pickers can be “paired” – where one or more date pickers will use the value of another date picker as starting date
  • supports internationalization
  • works by automatically attaching a small calendar icon to the indicated input fields which displays the attached datepicker when clicked.
  • Thanks to Aeron Glemann for building a datepicker for MooTools where he came up with the idea of disabling dates using a syntax similar to cron’s!

Web / www folder permissions – multiple users group access

How to set up correctly linux www folder permissions on a web server.

A quick setup allowing to set correct web folders permissions on a web server granting write access to users belonging to a specified group.

Please note that in order to separate users permissions multiple groups are required and this quick tutorial doesn’t cover such scenario.

Step1: Add users to your web server group

You can find out which group folders and files belong to by simply running:
ls -la

This should show a list where 4th column indicates group name eg:

-rw-r–r–  1 john developers    244 Jan 21 16:06 index.htm

In the above example ‘developers’ is the group name and ‘john’ user belonging to it. So, the file belongs to ‘john’ but also users in ‘developers’ group will have access to it.

On Linux Centos 6.3 by default apache adds web folder to ‘www-data’ group. Therefore, I will add users that should have access to it to this group:

sudo usermod -a -G www-data user1

Now, once we have user added to our web group called ‘www-data’ which is owned by user with exactly the same name it’s time to enforce all new content created under your web directory to belong to ‘www-data’ group as well so both users and web server can access it.

Step 2: Change folders permission recursively

Go to your web folder where web sites reside (e.g. cd /var/www) and run:

chmod 2774 -R .

All folders’ permissions inside your web directory should now look like:

drwxrwsr–  1 john www-data    244 Mar 12 11:34

In order to remove users from groups use:

gpasswd -d user group

Git server installation

Install git package on your server (google install git server OS_NAME)

# ssh into your server and run the following commands:

$ sudo adduser git
$ su git
$ mkdir .ssh

#If you haven’t already done so already generate ssh keys on your local client machine:

$ ssh-keygen -t rsa -C “”

# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
# Enter file in which to save the key (/path_to_your_home_folder/.ssh/id_rsa): [Press enter]…

# copy contents of into memory
# back on your server server
$ vi ~/.ssh/authorized_keys
# press letter i and paste (CTRL + V or CMD +V)
# press : (colon) then type wq and enter

# Now it’s time to create some git repo(s) where you’ll push your code:
# Firstly, repo creation on your server:

$cd ~
$ mkdir project.git
$ cd project.git
$ git –bare init

# Back on your client create new git local repo:

$ mkdir project.git
$ cd project.git
$ git init

# Commit your current structure or files you add:

$ git add .
$ git commit -m ‘initial commit’

# add remote repo on your server so local git knows where to push:
$ git remote rm origin
$ git remote add origin git@gitserver:/opt/git/project.git
$ git push origin master

Note: if you are logged in as different user than git on your client you’ll be asked for a password each time you push/fetch/pull from the server. You can set one by running on the server:

#sudo passwd git

Otherwise it should not prompt for any.

Git aliases

Useful git aliases:

#create “cm” alias for “commit”
git config commit

#create “co” alias for checkout
git config checkout

#make “br” alias for branch
git config branch

# create alias for diff
git config alias.df diff

# create alias for status
git config diff

# When you want to see just the differences of one function in one file in two different commits:
git config alias.funcdiff ‘!sh -c “git show \”\$1:\$3\” | sed -n \”/^[^ \t].*\$4(/,/^}/p\” > .tmp1 &&
git show \”\$2:\$3\” | sed -n \”/^[^ \t].*\$4(/,/^}/p\” > .tmp2 &&
git diff –no-index .tmp1 .tmp2″‘ –