This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -ntu | awk ' $5 ~ /^(::ffff:|[0-9|])/ { gsub("::ffff:","",$5); print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n "Deleting ... " | |
curl -XDELETE http://localhost:9200/test_date | |
echo "" | |
echo -n "Create index ... " | |
curl -XPUT http://localhost:9200/test_date | |
echo "" | |
echo -n "Put mapping ... " | |
curl -XPUT http://localhost:9200/test_date/test/_mapping -d ' | |
{ | |
"test":{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function add_business_days($datetime, $duedays) | |
{ | |
$i = 1; | |
while ($i <= $duedays) | |
{ | |
$next_day = date('N', strtotime('+1 day', $datetime)); | |
if ($next_day == 6 || $next_day == 7) | |
{ | |
$datetime = strtotime('+1 day', $datetime); | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git submodule add git://github.com/kohana/core.git system | |
git submodule add git://github.com/kohana/database.git modules/database | |
git submodule add git://github.com/kohana/userguide.git modules/userguide | |
git submodule add git://github.com/kohana/image.git modules/image | |
git submodule add git://github.com/kohana/codebench.git modules/codebench | |
git submodule add git://github.com/kohana/auth.git modules/auth | |
git submodule add git://github.com/kohana/pagination.git modules/pagination | |
git submodule add git://github.com/kohana/orm.git modules/orm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
element_ready: function(id, callback, interval) { | |
var interval = interval ? interval : 100; | |
var check = setInterval(function() { | |
if (document.getElementById(id)) | |
{ | |
clearInterval(check); | |
callback(); | |
} | |
}, interval); | |
} |