Skip to content

Instantly share code, notes, and snippets.

@svs14
svs14 / install-mongo-ubuntu-14.04.sh
Created May 29, 2015 04:29
Installs Mongo on Ubuntu 14.04
#!/bin/bash
# Installs Mongo on Ubuntu 14.04
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
@svs14
svs14 / ubuntu-install-spark-dep.sh
Created April 24, 2015 03:17
Installs Apache spark dependencies on Ubuntu 14.04
#!/bin/sh
# Installs Apache spark dependences on Ubuntu 14.04
# Install Oracle Java 7 JDK
sudo apt-add-repository ppa:webupd8team/java
sudo aptitude update
sudo aptitude install oracle-java7-installer
# Install scala
wget www.scala-lang.org/files/archive/scala-2.11.6.deb
@svs14
svs14 / archlinux-install-python-scientific.sh
Created February 27, 2014 06:49
Installs python2 specific software for scientific applications on ArchLinux.
#!/bin/bash
# Installs python2 specific software
# for scientific applications on ArchLinux.
#
# Requirements:
# - packer
# - python2
# You must be in a virtualenv session with python2 set as python.
# Exit script on any command failure
@svs14
svs14 / ubuntu-install-R.sh
Last active August 29, 2015 13:56
Installs latest R related software for Ubuntu 12.04 LTS.
#!/bin/sh
# Installs latest R related software for Ubuntu 12.04 LTS.
# Install latest R
sudo add-apt-repository ppa:marutter/rrutter
sudo aptitude -y update
sudo aptitude -y install r-base r-base-dev
# Install RStudio
sudo aptitude -y install gdebi-core libapparmor1
@svs14
svs14 / ubuntu-install-python-scientific.sh
Last active August 29, 2015 13:56
Installs python specific software for scientific applications on Ubuntu 12.04 LTS.
#!/bin/sh
# Installs python specific software
# for scientific applications on Ubuntu 12.04 LTS.
#
# It is recommended to run this in a virtualenv session.
# Install numpy
sudo aptitude -y build-dep python-numpy
pip install numpy
# Install scipy
@svs14
svs14 / reverse-proxy.conf
Created December 26, 2013 02:21
Setup HTTP reverse proxy in Apache. Add this configuration to /etc/apache2/conf.d/. Ensure proxy_http module for Apache is enabled.
<IfModule mod_proxy_http.c>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
@svs14
svs14 / ubuntu-fix-nectar.sh
Last active January 1, 2016 09:59
Fixes Ubuntu on NECTAR
#!/bin/sh
#
# Patches system settings on a NECTAR Ubuntu instance.
#
# Fix host resolution error
echo "127.0.1.1 $(hostname)" | sudo tee -a /etc/hosts
# Set default language to Australian (en_AU-UTF8) with POSIX messages
sudo locale-gen en_AU.UTF-8
@svs14
svs14 / archlinux-env_custom-bootstrap.sh
Last active January 1, 2016 02:59
Bootstraps a fresh ArchLinux install with env-custom (dot files) and oh-my-zsh.
#!/bin/bash
#
# Bootstraps env-custom for ArchLinux machine
# additionally with oh-my-zsh.
#
# Set bash to exit immediately on failure
set -e
# Set bash statements to return failure if any piped command within it fails
@svs14
svs14 / ubuntu-12.04-env_custom-bootstrap.sh
Last active December 19, 2015 18:19
Bootstraps a fresh Ubuntu 12.04 install with env-custom (dot files) and oh-my-zsh.
#!/bin/bash
#
# Bootstraps env-custom for Ubuntu machine 12.04
# additionally with oh-my-zsh.
#
# Set bash to exit immediately on failure
set -e
# Set bash statements to return failure if any piped command within it fails