lets fix the ubuntu locale issue (digitalocea.com droplets)
1. step, browse locale settings
root@piklook-dev:~# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
<?php | |
/** | |
* Creating date collection between two dates | |
* | |
* <code> | |
* <?php | |
* # Example 1 | |
* date_range("2014-01-01", "2014-01-20", "+1 day", "m/d/Y"); | |
* |
lets fix the ubuntu locale issue (digitalocea.com droplets)
1. step, browse locale settings
root@piklook-dev:~# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
#!/bin/bash | |
echo Removing $1 from denyhosts tables | |
WORK_DIR=/var/lib/denyhosts/ | |
IP=`echo $1 | sed 's/\./\\\\./g'` | |
service denyhosts stop | |
eval "sed -i /$IP/d /etc/hosts.deny" | |
eval "sed -i /$IP/d ${WORK_DIR}hosts" | |
eval "sed -i /$IP/d ${WORK_DIR}hosts-restricted" | |
eval "sed -i /$IP/d ${WORK_DIR}hosts-root" | |
eval "sed -i /$IP/d ${WORK_DIR}hosts-valid" |
<?php | |
/** | |
* Get value of index in fibonacci series | |
* | |
* @author Ali OYGUR <[email protected]> | |
* @param int $n index number | |
* @return int value of index | |
*/ | |
function fibonacci($n) | |
{ |
" File-type highlighting and configuration. | |
" Run :filetype (without args) to see what you may have | |
" to turn on yourself, or just set them all to be sure. | |
syntax on | |
filetype on | |
filetype plugin on | |
filetype indent on | |
" Intuitive backspacing in insert mode | |
set backspace=indent,eol,start |
<?php | |
/** | |
* Countries List | |
* @return array | |
*/ | |
function countries() | |
{ | |
$countries = Array( | |
'AF' => 'Afghanistan', |