Skip to content

Instantly share code, notes, and snippets.

View thpoul's full-sized avatar

Thanos thpoul

  • Athens, Greece
View GitHub Profile
@thpoul
thpoul / mysql-output-csv.sql
Created July 4, 2015 10:19
Output MySQL query result to .csv format (useful for large datasets)
-- This will save the the query result to /tmp/output.csv
SELECT
*
FROM table
INTO OUTFILE '/tmp/output.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
@thpoul
thpoul / es.sh
Created July 23, 2012 10:50
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.8.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share