# How to fix SSL "certificate verify failed" error making it impossible to pull data from 'https://rubygems.org/ in Ubuntu 16.04 LTS 64-bit# 
# This bash script will make it possible to use the "sudo gem install <package>" command
# For example: sudo gem install tenancy   will work after running this script
sudo apt-get update
sudo apt-get install ruby
sudo update-ca-certificates
sudo gem sources -r https://rubygems.org/
sudo gem sources -a http://rubygems.org/
sudo gem update --system
sudo gem sources -r http://rubygems.org/
sudo gem sources -a https://rubygems.org/
sudo gem install tenancy
# Livestreamer Twitch GUI - A multi platform Twitch.tv browser for Livestreamer
# bash install script
sudo apt-get update
sudo apt-get install livestreamer x11-utils xdg-utils git
cd
sudo rm -rf livestreamer-twitch-gui
git clone https://github.com/bastimeyer/livestreamer-twitch-gui.git
cd livestreamer-twitch-gui/
sudo npm install -g grunt bower grunt-cli
npm install qunit phantomjs
npm update
bower install
grunt release
grunt
# the grunt command replaces the use of the following command:
# ~/livestreamer-twitch-gui/build/releases/livestreamer-twitch-gui/linux64/livestreamer-twitch-gui
# How to compile, install and run newest version of Orthanc DICOM server
# from Github source in Ubuntu 16.04 LTS
cd 
sudo apt-get update
sudo apt-get install build-essential unzip cmake mercurial uuid-dev libcurl4-openssl-dev liblua5.1-0-dev libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev libcharls-dev libjsoncpp-dev libpugixml-dev doxygen firefox
sudo rm -rf Orthanc*
sudo apt-get purge orthanc
git clone https://github.com/jodogne/OrthancMirror.git
mkdir ~/OrthancBuild
cd ~/OrthancBuild/
cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/OrthancMirror/
sudo make
sudo make doc
./Orthanc --version
./Orthanc &
firefox http://localhost:8042/app/explorer.html
# How to compile and install ChucK Music Programming Language (http://chuck.stanford.edu/) from source code (via Github) in Ubuntu 16.04 LTS 64-bit:
cd
sudo apt-get update
sudo apt-get purge chuck
sudo apt-get install pulseaudio aptitude curl cmake git checkinstall build-essential  git-core
sudo apt-get build-dep chuck
sudo rm -rf chuck
git clone https://github.com/ccrma/chuck.git
cd ~/chuck/src
sudo make linux-alsa
sudo checkinstall
# during the checkinstall process, press 2 to change the name from "src" to "chuck"
apt-cache show chuck
# Terminal output should look like this:
# Package: chuck
# Status: install ok installed
# Priority: extra
# Section: checkinstall
# Installed-Size: 2104
# Maintainer: root
# Architecture: amd64
# Version: 20160612-1
# Provides: src
# Description: Package created with checkinstall 1.6.2
# Description-md5: 556b8d22567101c7733f37ce6557412e
# How to compile and install root data analysis framework from source code (via Github) in Ubuntu 14.04 LTS 64-bit:
# Please run the following Terminal commands ONE LINE AT A TIME manually in bash shell
# The following commands CANNOT be successfully run using a bash script due to the way the privilege escalation occurs!
cd
sudo apt-get update
sudo apt-get build-dep root-system
sudo apt-get install aptitude curl cmake git checkinstall build-essential  git-core 
sudo aptitude install libafterimage-dev  freeglut3-dev    libftgl-dev    libgl1-mesa-dev   libglew-dev    libglu1-mesa-dev libnet-dev libroot-net-dev
sudo aptitude install  libiodbc2-dev   libqt4-opengl-dev mesa-common-dev  libdrm-dev  libiodbc2  libdrm-intel1 libxpm-dev libxft-dev
sudo rm -rf root
git clone http://root.cern.ch/git/root.git
cd root
sudo ./configure
sudo make
# use the following command to speed up the compilation process if you are using an 8-core CPU:
#sudo make -j8
sudo su
source bin/thisroot.sh
export ROOTSYS=/home/`logname`/root
checkinstall 
# during checkinstall process, press 3 and manually change 'Version' to 20160602
apt-cache show root
ln -s $ROOTSYS/bin/root  /usr/bin/root
# exit the bash shell session, open a new Terminal window and run the following Terminal command to start the root data analysis framework:
root
# install newest Java version (which Apache Ant will depend on later on):
 sudo add-apt-repository ppa:webupd8team/java
 sudo apt-get update
 sudo apt-get purge icedtea-netx oracle-java8-installer
 sudo apt-get build-dep ant
 sudo apt-get install icedtea-netx oracle-java9-installer
 java -version
 # Terminal output should be similar to this:
 # java version "9-ea"
 # Java(TM) SE Runtime Environment (build 9-ea+102-2016-01-21-001533.javare.4316.nc)
 # Java HotSpot(TM) 64-Bit Server VM (build 9-ea+102-2016-01-21-001533.javare.4316.nc, mixed mode)
 ################################################################
 #install newest version of Apache Ant (depends on oracle-java9-installer being installed first) :
 # install Apache Ant (ant version >= 1.9.5 is prerequisite for compiling OmegaT)
 cd
 git clone https://github.com/apache/ant.git
 cd ant
 export JAVA_HOME=/usr/lib/jvm/java-9-oracle
 ./build.sh
 sudo mv /usr/bin/ant /usr/bin/antBACKUP
 sudo ln -s ~/ant/dist/bin/ant /usr/bin/ant
 ant -version
 # output should look like this:
 # Apache Ant(TM) version 1.9.7alpha compiled on October 16 2015
 ###############################################################
 # install newest version of OmegaT
 cd
 sudo rm -rf OmegaT
 git clone https://github.com/OmegaT-Project/OmegaT
 cd OmegaT
 sudo ant release
 time sudo ant test
 java -jar ~/OmegaT/dist/OmegaT.jar
 # OmegaT version should be 3.6.0 or higher
# How to compile and install OpenCPN 4.2.0 from source code (via Github) in Ubuntu 14.04 LTS 64-bit:
cd
sudo apt-get update
sudo apt-get install gettext git-core gpsd gpsd-clients libgps-dev wx-common libwxgtk3.0-dev libglu1-mesa-dev libgtk2.0-dev wx3.0-headers libbz2-dev libtinyxml-dev libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev
sudo apt-get install libcurl3 curl cmake git plplot12-driver-wxwidgets libalien-wxwidgets-perl checkinstall build-essential
sudo rm -rf OpenCPN
git clone https://github.com/OpenCPN/OpenCPN.git 
cd OpenCPN
mkdir build
cd build
cmake ../
sudo make
sudo checkinstall 
# during checkinstall process, press 2 and manually change name from build to opencpn
apt-cache show opencpn
# if you forgot to change the name of the newly built package, you need to use this command instead:
apt-cache show build
/usr/local/bin/opencpn

Source: http://opencpn.org/ocpn/book/export/html/28