git clone https://github.com/v1/repos/autobots
git clone https://github.com/v1/repos/autobots
import {Meteor} from 'meteor/meteor'; | |
import {check, Match} from 'meteor/check'; | |
import moment from 'moment'; | |
import bodybuilder from 'bodybuilder'; | |
import {Promise} from 'meteor/promise'; | |
import RequestPromise from 'request-promise'; | |
import _ from 'lodash'; | |
/* Collections */ | |
import {RFMScoreBoard, RFMTopTen} from '/imports/api/collections/rfm'; |
sudo yum -y install autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz | |
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish41/script.rpm.sh | sudo bash | |
wget --content-disposition https://packagecloud.io/varnishcache/varnish41/packages/el/6/varnish-4.1.10-1.el6.x86_64.rpm/download.rpm | |
sudo rpm -Uvh varnish-4.1.10-1.el6.x86_64.rpm | |
/usr/sbin/varnishd -V |
# DELETE _template/mysql_slow | |
PUT _template/mysql_slow | |
{ | |
"order": 0, | |
"template": "mysql-slow-*", | |
"settings": { | |
"index": { | |
"number_of_shards": "1" | |
} | |
}, |
#!/usr/bin/env bash | |
# VARIABLES # | |
AWSAccessKeyId=\$1 | |
AWSSecretKey=\$2 | |
CRON_DIR=/var/spool/cron | |
# EXECUTE # | |
# Install libs | |
sudo yum install -y unzip perl-libwww-perl perl-libdatetime-perl perl-Sys-Syslog perl-DateTime-TimeZone perl-LWP-Protocol-https perl-Crypt-SSLeay | |
# Setup AWS mon scripts | |
mkdir ~/aws |
sudo yum install gcc-c++ pcre-devel zlib-devel make unzip openssl-devel libuuid-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel gperftools-devel | |
#[check the release notes for the latest version] | |
NPS_VERSION=1.13.35.2-stable | |
cd | |
wget https://github.com/apache/incubator-pagespeed-ngx/archive/v${NPS_VERSION}.zip | |
unzip v${NPS_VERSION}.zip | |
nps_dir=$(find . -name "*pagespeed-ngx-${NPS_VERSION}" -type d) | |
cd "$nps_dir" | |
NPS_RELEASE_NUMBER=${NPS_VERSION/beta/} | |
NPS_RELEASE_NUMBER=${NPS_VERSION/stable/} |
function toHex(s) { | |
// utf8 to latin1 | |
var s = unescape(encodeURIComponent(s)) | |
var h = '' | |
for (var i = 0; i < s.length; i++) { | |
h += s.charCodeAt(i).toString(16) | |
} | |
return h | |
} |
# Source From: https://www.jeremydaly.com/access-aws-vpc-based-elasticsearch-cluster-locally/ | |
# You need to have an EC2 instance running in the same VPC as your Elasticsearch cluster. | |
# If you don’t, fire up a micro Linux instance with a secure key pair. | |
# NOTE: Make sure your instance’s security group has access to the Elasticsearch cluster and | |
# that your Elasticsearch cluster’s access policy uses the “Do not require signing request with IAM credential” template. | |
# At local Client | |
## Create SSH Tunnel | |
cat << EOF > ~/.ssh/config | |
# Elasticsearch Tunnel |
# For using epel packages | |
sudo yum install nodejs npm --enablerepo=epel | |
# For disable SSL if error occur: "npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY" | |
sudo npm config set strict-ssl=false | |
# Install npm & version control | |
sudo npm install -g n | |
sudo npm install -g npm | |
# Install specific nodejs version | |
sudo n v10.8.0 |
ssh -i ~/.ssh/rsa_key.pem -t ec2-user@xxx.xxx.xxx.xxx 'ssh -i ~/.ssh/rsa_key.pem ec2-user@xxx.xxx.xxx.xxx' |