This file contains hidden or 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
| ## dynamic links to .so files | |
| ldd libopenblas.so | |
| ## install gxx-4.8 and/or gxx-4.9 on Ubuntu 12.04 or Ubuntu 14.04 | |
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install gcc-4.9 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 | |
| sudo apt-get install g++-4.9 |
This file contains hidden or 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
| ## System Monitoring Tools | |
| # TODO - provide more useful flags | |
| top | |
| free -m | |
| vmstat | |
| iostat | |
| iotop | |
| sar | |
| netstat |
This file contains hidden or 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
| ## check url of git-repo | |
| git remote -v | |
| ## change url of git-repo | |
| git remote set-url origin <new-git-repo-url> | |
| ## colorize git output | |
| # source: http://unix.stackexchange.com/a/44297/62741 | |
| # source: http://stackoverflow.com/a/13075208/925216 | |
| git config --global color.ui auto | |
| ## If 2FA is set in github, you have to generate an access token |
This file contains hidden or 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
| http://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files |
This file contains hidden or 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
| package com.test.lucene; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.io.StringReader; | |
| import java.util.Calendar; | |
| import org.apache.lucene.analysis.Analyzer; | |
| import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
| import org.apache.lucene.document.Document; |
This file contains hidden or 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
| ## debian package manager tips | |
| # source: http://askubuntu.com/a/17829/258167 | |
| # source: http://askubuntu.com/a/423556/258167 | |
| # To check whether a package is installed or not: | |
| dpkg -l | |
| dpkg -l libprotobuf # OR | |
| dpkg -l | grep libprotobuf | |
| # Show the location where the package is installed | |
| sudo dpkg -S libprotobuf |
This file contains hidden or 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
| ## recursive search only in specific filetypes | |
| grep -nr --include=<pattern> <string> <directory> | |
| # grep -nr -i --include *.{cpp,hpp,java} "isequal" . | |
| # grep -nr -i --include *.cpp --include *.hpp "isequal" . | |
| ## grep seach exact word | |
| grep -r -i /^word$/ . |
This file contains hidden or 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 login into mysql through command line similar to connecting ssh hosts | |
| -- write following options in your ~/.my.cnf file | |
| -- Ref # http://dba.stackexchange.com/q/3889 | |
| [clientremote] | |
| host=db_host_ip | |
| user=db_username | |
| password=db_password | |
| database=db_schema | |
| [clientlocal] |