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
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
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
sudo apt-get install python-cairo python-memcache python-sqlite memcached python-django-tagging python-django libapache2-mod-python apache2 libapache2-mod-wsgi git-core python-pyparsing python-tz libdbd-mysql-perl libmysqlclient-dev libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common python-mysqldb | |
mkdir -p /var/tmp/software | |
cd /var/tmp/software | |
git clone https://github.com/graphite-project/graphite-web.git | |
git clone https://github.com/graphite-project/carbon.git | |
git clone https://github.com/graphite-project/whisper.git | |
for i in whisper carbon graphite-web; do |
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
var RTBkit = require('./build/x86_64/bin/rtb.node'); | |
var services = require('./build/x86_64/bin/services.node'); | |
var zookeeperUri = "localhost:2181"; // must point to same Zookeeper as routers | |
var services = new services.ServiceProxies(); | |
services.useZookeeper(zookeeperUri); | |
services.logToCarbon('localhost:2003'); | |
var agent = new RTBkit.BiddingAgent("myAgent", services); |
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
var RTBkit = require('../build/x86_64/bin/rtb.node'); | |
var services = require('../build/x86_64/bin/services.node'); | |
var zookeeperUri = "localhost:2181"; //must point to same Zookeeper as routers | |
var services = new services.ServiceProxies(); | |
services.bootstrap('bootstrap.json'); | |
var agent = new RTBkit.BiddingAgent('myAgent', services); |
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
################# | |
# Update packages | |
################# | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes update | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes upgrade | |
######################## | |
# Install the Oracle JDK | |
######################## |
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
################# | |
# Update packages | |
################# | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes update | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes upgrade | |
######################## | |
# Install the Oracle JDK | |
######################## |
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
/** | |
* api/models/User.js | |
* | |
* The user model contains the instance method for validating the password. | |
*/ | |
var bcrypt = require('bcrypt'); | |
function hashPassword(values, next) { | |
bcrypt.hash(values.password, 10, function(err, hash) { |
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
var SailsOrm = require([path to sails]'/lib/hooks/orm'); | |
var _ = require( 'lodash' ); | |
var async = require('async'); | |
function orm () | |
{ | |
/** | |
* Start the ORM layer | |
* |
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
// add the filter to your application module | |
angular.module('yourAppName', ['filters']); | |
/** | |
* Truncate Filter | |
* @Param string | |
* @Param int, default = 10 | |
* @Param string, default = "..." | |
* @return string | |
*/ |
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
# miner_pool.sh - executes a script against each instance: ./mine_pool.sh setup.sh | |
# list your instances here | |
# use ami-12b6477b | |
INSTANCES="ec2-50-19-52-212.compute-1.amazonaws.com | |
ec2-50-16-126-107.compute-1.amazonaws.com | |
ec2-184-72-177-183.compute-1.amazonaws.com | |
ec2-50-17-126-57.compute-1.amazonaws.com | |
ec2-184-73-119-153.compute-1.amazonaws.com" |
OlderNewer