Pages

Monday, April 22, 2013

navbar search


  1. <form class="navbar-search pull-left">  
  2.   <input type="text" class="search-query" placeholder="Search">  
  3. </form>  

Tuesday, April 2, 2013

php format date


$originalDate = "2010-03-21";
$newDate = date("d-m-Y", strtotime($originalDate));


<? echo date(" \n l jS F Y", strtotime($data['availability'])) ?>

http://php.net/manual/en/datetime.format.php

Monday, April 1, 2013

ec2 machine


curl -XPUT 'http://ec2-184-73-28-56.compute-1.amazonaws.com:9200/blog/post/1' -d '
{
    "user": "dilbert",
    "postDate": "2011-12-15",
    "body": "Search is hard. Search should be easy." ,
    "title": "On search"
}'

scp -i PrashantKey.pem FinaleCrawler-full.jar ubuntu@ec2-184-73-28-56.compute-1.amazonaws.com:/data

http://ec2-184-73-28-56.compute-1.amazonaws.com:9200/document/post/_search

EC2 Ubuntu Instance - UNPROTECTED PRIVATE KEY FILE


UNPROTECTED PRIVATE KEY FILE!  
permissions 0644 for 'xxxxx.pem' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: xxxxx.pem
Permission denied (publickey).

Private keys must be readable only by the owner ..
Do chmod 400 xxxxx.pem on the machine from which you're connecting

scp (secure copy) to ec2 instance without password


scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz ec2-user@mec2-50-17-16-67.compute-1.amazonaws.com:~/.