Skip to content

Instantly share code, notes, and snippets.

View adamasantares's full-sized avatar
🎯
Focusing

Konstantin Kutsevalov adamasantares

🎯
Focusing
View GitHub Profile
@samhernandez
samhernandez / gist:5260558
Last active September 24, 2019 11:58
Get an RSS pubDate from a Javascript Date instance.
/**
* Get an RSS pubDate from a Javascript Date instance.
* @param Date - optional
* @return String
*/
function pubDate(date) {
if (typeof date === 'undefined') {
date = new Date();
}
@JPry
JPry / nginx.conf
Created November 29, 2012 18:50
Nginx - Force PDFs to download
location ~* /(.*\.pdf) {
types { application/octet-stream .pdf; }
default_type application/octet-stream;
}
@rajraj
rajraj / es.sh
Created January 3, 2012 20:07 — forked from aaronshaf/es.sh
Install ElasticSearch on CentOS 6
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share