Category: Computer Tips


Install LINDA for R

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

under su: mkdir ~/.R echo “CPPFLAGS=-fpermissive” >> ~/.R/Makevars ln -s /location/of/LINDA /usr/local/ R in “R”: install.packages(“Rcpp”) install.packages(“magrittr”) install.packages(“drat”) drat::addRepo(“ANTs-R”) install.packages(“ANTsR”) install.packages(“randomForest”) source(‘/usr/local/LINDA/linda_predict.R’) q()

Linux create salted password

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Method 1 openssl passwd -1 -salt xyz yourpass Method 2 makepasswd –clearfrom=- –crypt-md5 <<< YourPass Method 3 echo "username:password" | chpasswd Or you can use encrypted password with chpasswd first generate it using : perl -e 'print crypt("YourPasswd", "salt"),"\n"' then later you can use generated password to update echo "username:encryptedPassWd" | chpasswd -e this encrypted […]

Yum is not compatible with Matlab Runtime

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

So do not put matlab runtime into ld.so.conf.d. If yum broken, remove that file and do ldconfig.

du only local files

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

sudo find . -maxdepth 1 -type d ! -name . -exec du -sh ‘{}’ \; | sort -h

Matlab: libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Starting Matlab R2015a or newer in CentOS7 or recent version of Fedora, the error libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed will rise through does not affect the normal working of Matlab. This problem is caused by the libstdc++.so.6 coming with Matlab. Matlab carries statically linked libstdc++.so.6.0.17 in /matlab_folder/sys/os/glnxa64. When the system version of libstdc++.so.6 is lower […]

htdigest

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

htdigest [-c for create password file] password_file_name ‘realm name’ username it will prompt you twice for a password.

qap installation

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

pip install –upgrade numpy scipy && pip install –upgrade nipype nibabel nitime pyyaml pandas cd qap python setup.py install

Mount cifs through ssh tunnel

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

on local: ssh -N -L 139:127.0.0.1:445 user@remote.host.name on local: mount -t cifs -o username=user,version=3 //localhost/user/ mountpoint

Installing CentOS 7

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Estimated partition size/usage (off 223.5GB HD) / 63GB 18GB 28% swap 16GB /usr/local 127.75GB 33GB 26% /boot 765MB 201MB 21% /data/home0 16GB 34MB 1% Step 1: setup nfs to export CentOS7 full package and ks.cfg file, start the NFS server, do not forget to lift the firewall so that it will be seen by the […]

Linux animated GIF to MPEG

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Package required: ffmpeg, gifview, mplayer. Randering gif: # gifview fn.gif Converting: # Convert fn.gif fn.mpg Examine result: mplayer fn.mpg