Create new repostory at github and add new directory with files from terminal

Just use this script : committogithub.sh

  1. curl -u $1 https://api.github.com/user/repos -d "{\"name\":\"$2\"}"
  2. git init
  3. git add .
  4. git commit -a -m "added all"
  5. git remote rm origin
  6. git remote add origin "ssh://git@github.com/$1/$2.git"
  7. git remote -v
  8. git push -u origin master

Or Download it (commitnewfilestogithub.sh)


Usage : 


  1. sh committogithub.sh username reponame

Note : Make sure you have setup your ssh correctly for the system you are using at https://github.com/settings/ssh

Making javascript heavy sites crawlable / SEO with Prerender.IO / Getting started with Prerender.io for java sites

Setup prerender node server:
  1. git clone https://github.com/prerender/prerender.git
  2. cd prerender/
  3. #build and install
  4. # you will need nodejs's npm utility
  5. npm install
  6. node server.js

Indicate to the crawler that your site supports the AJAX crawling scheme :

replace all hash("#") with hash-bang("#!")

To handle pages without hash fragments put this in those pages
<meta name="fragment" content="!">

pom.xml :
//add this survlet filter( https://github.com/greengerong/prerender-java ) in your pom.xml:

  1. <dependency>
  2. <groupId>com.github.greengerong</groupId>
  3. <artifactId>prerender-java</artifactId>
  4. <version>1.6.2</version>
  5. </dependency>

web.xml :

  1. <filter>
  2. <filter-name>prerender</filter-name>
  3. <filter-class>com.github.greengerong.PreRenderSEOFilter</filter-class>
  4. <init-param>
  5. <param-name>prerenderServiceUrl</param-name>
  6. <param-value>http://localhost:3000</param-value>
  7. </init-param>
  8. <init-param>
  9. <param-name>crawlerUserAgents</param-name>
  10. <param-value>yourOwnCrawler</param-value>
  11. </init-param>
  12. <init-param>
  13. <param-name>extensionsToIgnore</param-name>
  14. <param-value>.xml</param-value>
  15. </init-param>
  16. </filter>
  17. <!--default crawlers "googlebot", "yahoo", "bingbot", "baiduspider",
  18. "facebookexternalhit", "twitterbot", "rogerbot", "linkedinbot", "embedly" -->
  19. <filter-mapping>
  20. <filter-name>prerender</filter-name>
  21. <url-pattern>/*</url-pattern>
  22. </filter-mapping>


//prerender-java client bug 1.6.2
you have to include this tag
<init-param>
            <param-name>extensionsToIgnore</param-name>
            <param-value>.xml</param-value>
        </init-param>
//for 1.6.3 this is not required, but it's not yet in central maven repository

all Other clients list :
https://github.com/prerender/prerender#middleware

Testing:

git clone https://github.com/ahmedmohiduet/ng-prerender-demo.gitcd ng-prerender-demo
mvn clean install tomcat7:run


curl -A "GoogleBot" http://localhost:9966/ng-prerender-demo/
#don't forget to put / at the end
curl http://10.0.0.52:9966/ng-prerender-demo/
#note the difference

you can also show them sample content:
http://localhost:3000/http://www.flipclub.com/card/422/Archaeology-1 
or
http://service.prerender.io/http://www.flipclub.com/card/422/Archaeology-1 

You can also use service : http://service.prerender.io/


Prerender caches :

* In-memory html cache (just uncomment this line at https://github.com/prerender/prerender/blob/master/server.js#L18 and in-memory cache will b enabled.)
* Amazon s3
* Redis Cache
* Your Own Implementation ( Example : https://github.com/lammertw/prerender-mongodb-cache )
* More.*..

It's paid version provides automatic caching of pages and persistent cache automatically gets synchronized. 

Install ffmpeg version 2.3.3 on CentOS 6

  1. #remove previous installation if exists
  2. yum remove ffmpeg
  3. cd /usr/local
  4. #download ffmpeg 2.3.3
  5. wget http://ffmpeg.org/releases/ffmpeg-2.3.3.tar.bz2
  6. tar -jxvf ffmpeg-2.3.3.tar.bz2
  7. #remove backup
  8. rm ffmpeg-2.3.3.tar.bz2
  9. cd ffmpeg-2.3.3
  10. ./configure
  11. #build and install
  12. make && make install
  13. #check and see installation version
  14. ffmpeg --version

Download script : Install ffmpeg 2.3.3.sh