Category: Computer Tips
If build cannot find lib
export LIBRARY_PATH=/path
SSH tunnel
ssh -f username@remote.host -R <The IP of the interface you want to bind the port>:<port_on_remote_host>:localhost:22 -N Without “The IP of the interface you want to bind the port”, it will only bind on loopback interface 127.0.0.1 To enable binding on other than loopback interface, you have to add GatewayPorts clientspecified in your /etc/ssh/sshd_config and reload […]
AWS: How to mount S3 bucket on your EC2 instance if your role allows it
s3fs -o iam_role=auto <your_bucket_name> <your_mounting_point>
How to recover a very large RAID6
RAID6 is supposed to have two sets of redundancy that could survive a simultaneous failure of two drives, and it can go directly on automatic rebuilding if you have hot swaps. However, you must have known that the RAID controller and the back plane are still playing dictatorship for a RAID group. It could happen […]
Breaking NFS’ 16 group membership limit
The 16 group limit with auth_sys is not tuneable. It is defined in RFC_5331 and cannot be adjusted or patched. However for linux running nfs-utils version over 1.0.12 and kernel version over 2.6.21, you can make rpc.mountd to manage gid to avoid this limitation. To do this: On all your nfs server, edit /etc/nfs.conf, add […]
ninja make
yum install -y ninja-build cmake -GNinja ../src ninja-build
Install LINDA for R
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
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
So do not put matlab runtime into ld.so.conf.d. If yum broken, remove that file and do ldconfig.
du only local files
sudo find . -maxdepth 1 -type d ! -name . -exec du -sh ‘{}’ \; | sort -h