Author: leizhou


Website:

http://bitc.bme.emory.edu/Members/lzhou.html

About this author:


du only local files

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

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

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

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

qap installation

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

Mount cifs through ssh tunnel

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

R update packages

install.packages( lib = lib <- .libPaths()[1], pkgs = as.data.frame(installed.packages(lib), stringsAsFactors=FALSE)$Package, type = ‘source’ )   # store_packages.R # # stores a list of your currently installed packages tmp = installed.packages() installedpackages = as.vector(tmp[is.na(tmp[,”Priority”]), 1]) save(installedpackages, file=”~/Desktop/installed_packages.rda”) # restore_packages.R # # installs each package from the stored list of packages load(“~/Desktop/installed_packages.rda”) for (count in 1:length(installedpackages)) install.packages(installedpackages[count])

Installing CentOS 7

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

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

Running 32bit java program in 64bit Linux (jMRUI)

First, why? It is well known that 64 bit java platform can run java code compiled in 32 bit development environment. However, some java codes call C++ libraries. For example, if for some reason you will have to run a very old – stopped developing program, like jMRUI, which was programmed in the 32 bit […]

YABB and selinux

Remember to add read privilege to httpd_sys_script_t as of allow httpd_sys_script_t httpd_sys_script_exec_t:file { append create unlink write read }; allow httpd_sys_script_t httpd_sys_script_exec_t:dir { add_name write remove_name read };