This file contains 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
#!/usr/bin/env bash | |
set -e | |
# textile daemon | |
wget https://s3.amazonaws.com/dist.textile.io/textile-go-linux-amd64.tar.gz | |
tar xvfz textile-go-linux-amd64.tar.gz | |
rm textile-go-linux-amd64.tar.gz | |
sudo mv textile-go-linux-amd64 /usr/local/bin/textile |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
echo 'export IPFS_PATH=/data/ipfs' >>~/.bash_profile | |
source ~/.bash_profile | |
# ipfs daemon | |
wget https://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.15_linux-amd64.tar.gz | |
tar xvfz go-ipfs_v0.4.15_linux-amd64.tar.gz |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
# install nginx | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum install ./epel-release-latest-7.noarch.rpm -y | |
sudo yum install nginx -y | |
rm epel-release-latest-7.noarch.rpm |
This file contains 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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
include /usr/share/nginx/modules/*.conf; | |
events { | |
worker_connections 1024; | |
} |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
[ -z "$CLUSTER_SECRET" ] && echo "Need to set CLUSTER_SECRET" && exit 1; | |
echo 'export IPFS_PATH=/data/ipfs' >>~/.bash_profile | |
echo 'export IPFS_CLUSTER_PATH=/data/ipfs-cluster' >>~/.bash_profile | |
source ~/.bash_profile |
This file contains 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
1. Install Linux updates, set time zones, followed by GCC and Make | |
sudo yum -y update | |
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
/etc/localtime | |
sudo yum -y install gcc make | |
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |
This file contains 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
SELECT | |
ST_Length(ST_MakeLine(the_geom_webmercator ORDER BY created_at ASC)) AS sum | |
FROM sf_muni | |
WHERE id = '2' |
This file contains 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
CREATE OR REPLACE FUNCTION clearOld() | |
RETURNS TRIGGER | |
AS $$ | |
BEGIN | |
DELETE FROM sf_muni_points WHERE created_at < now()-'1 day'::interval; | |
RETURN NEW; | |
END; | |
$$ language plpgsql; | |
CREATE TRIGGER clearOldOnInsert |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torque Heatmap w/ GMA</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="Icons/favicon.ico" /> | |
<style> | |
html, body, #map-canvas { |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torque Heatmap w/ GMA</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="Icons/favicon.ico" /> | |
<style> | |
html, body, #map-canvas { |