Skip to content

Instantly share code, notes, and snippets.

View nitheeshas's full-sized avatar

Nitheesh nitheeshas

  • Munich, Germany
View GitHub Profile
@nitheeshas
nitheeshas / install_font_scp.sh
Created December 22, 2017 03:06 — forked from veggiemonk/install_font_scp.sh
install source code pro font in Ubuntu 14.04.2
#!/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"
@nitheeshas
nitheeshas / installOpenCV.sh
Last active May 3, 2017 08:44
Install OpenCV 3.x. Contains only main points. Cannot be run as a setup script.
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
## 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
# 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
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
#/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'`
@nitheeshas
nitheeshas / install_ffmpeg_ubuntu.sh
Last active May 3, 2016 10:41 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/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
@nitheeshas
nitheeshas / git_https_to_ssh.sh
Last active May 3, 2016 10:40 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/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