View install_font_scp.sh
#!/bin/sh
echo "installing fonts at $PWD to ~/.fonts/"
mkdir -p ~/.fonts/adobe-fonts/source-code-pro
git clone https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
# find ~/.fonts/ -iname '*.ttf' -exec echo \{\} \;
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro
echo "finished installing"
View installOpenCV.sh
sudo apt-get install build-essential cmake git pkg-config libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev gfortran python2.7-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install virtualenv virtualenvwrapper
## Save to bashrc
# virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
View Install nVidia driver and CUDA in Ubuntu server
## This is not a run script. Go through and create modifications accordingly.
sudo apt-get install -y gcc make linux-generic
sudo apt-get install -y xserver-xorg mesa-utils
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
##Disabling noveau
sudo su - root
sudo echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf
sudo echo 'options nouveau modeset=0' >> /etc/modprobe.d/blacklist.conf
View Install OpenCL and Caffe for AMD graphics cards
# Just a gist of instructions to be followed. NOT an end-to-end guide or a copy-paste-as-script-and-run file
- Activate fglrx from driver manager. If not found, download driver from AMD website.
- If installing from AMD website, do this initially: sudo apt-get install dh-make dh-modaliases execstack libc6-i386 lib32gcc1
- Download AMD APP SDK and install using sudo sh <file>.sh
- Test using clinfo
- This won't link the lib and include files properly if you installed to /opt/ (atleast in my case).
- link the libOpenCL.so to ld's -lOpenCL path
- ld -lOpenCL --verbose : it will give the paths where ld searches for OpenCL library.
- link the libOpenCL.so which can be found in /opt/AMDAPPSDK-<version>/lib/x86_64/sdk/libOpenCL.so to /usr/local/lib, assuming /usr/local/lib is present in the output of step above. Else just use /usr/lib
View getOrientationFromEXIF.py
from PIL import Image, ExifTags
import sys
'''
1 2 3 4 5 6 7 8
888888 888888 88 88 8888888888 88 88 8888888888
88 88 88 88 88 88 88 88 88 88 88 88
8888 8888 8888 8888 88 8888888888 8888888888 88
88 88 88 88
View git_ssh_to_https.sh
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
# Forked from the original to do the opposite: Switch ssh repo urls to https
# Original here: https://gist.github.com/m14t/3056747
# Thanks to @m14t
#origin or upstream
REMOTE=${1-origin}
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'`
View install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
View git_https_to_ssh.sh
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi