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
GITHUB_PROJECT = “https://github.com/zagadishreddy/game-of-life.git” | |
GITHUB_CREDENTIALS_ID = “Telcel” //maps to a Jenkins Credentials Vault ID | |
APPLICATION_NAME = “Telcel” | |
GITHUB_BRANCH = ‘${env.BRANCH_NAME}’ | |
node{ | |
// Stages | |
stage (“Listing Branches”) { | |
echo “Initializing workflow” | |
//checkout code | |
echo GITHUB_PROJECT |
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 update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default | |
ruby -v |
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 http = require('http'); | |
var crypto = require("crypto"); | |
module.exports = function(method, path, bucket, accesskey, secretkey){ | |
var now = new Date().toUTCString(); | |
var returnChar = '\n'; | |
var strToSign = unescape(encodeURIComponent(method + returnChar + | |
returnChar + returnChar + returnChar + 'x-amz-date:' + now + | |
returnChar + path+bucket)); | |
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
// Step 1 Install tmpreaper | |
sudo apt-get install tmpreaper | |
/** | |
tmpreaper recursively searches for and removes files and empty | |
directories which haven’t been accessed for a given number of seconds. | |
Normally, it’s used to clean up directories which are used for | |
temporary holding space, such as "/tmp". Please read the WARNINGS | |
section of this manual. |
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
find /tmp/ -name "*.JPG" -print0 | xargs -0 rm |
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/log/mongodb/mongodb.log |
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-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
sudo touch -c /etc/apt/sources.list.d/mongodb.list | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
sudo apt-get install mongodb-10gen |
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
To change indexes in mongodb, first of all you may need to drop current index and then ensure to index on the attributes you want the index. | |
How to drop an index: | |
db.things.dropIndex("field/attributename"); | |
How to add index of the new fields : | |
db.things.ensureIndex({field1:1, field2:1},{unique:true}); |