This file contains 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
#!/bin/bash | |
set -x | |
find ./ -maxdepth 1 -type l -delete | |
ln -s /raid1/data/tensorboard_logs/* ./ | |
ln -s /raid2/data/tensorboard_logs/* ./ | |
ln -s /raid3/data/tensorboard_logs/* ./ |
This file contains 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
nvidia-docker save <docker-image-name> | gzip > <path-to-tgz-file> | |
nvidia-docker load -i <path-to-tgz-file> |
This file contains 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
#!/usr/bin/env bash | |
NEW_HOSTNAME=$1 | |
echo $NEW_HOSTNAME > /proc/sys/kernel/hostname | |
sed -i 's/127.0.1.1.*/127.0.1.1\t'"$NEW_HOSTNAME"'/g' /etc/hosts | |
echo $NEW_HOSTNAME > /etc/hostname | |
service hostname start | |
su $SUDO_USER -c "xauth add $(xauth list | sed 's/^.*\//'"$NEW_HOSTNAME"'\//g' | awk 'NR==1 {sub($1,"\"&\""); print}')" |
This file contains 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
#!/bin/bash | |
unison -perms 0 -rsrc false /home/andmax /media/andmax_bkp |
This file contains 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
1- git config credential.helper store | |
2- git push | |
3- <type in password> |
This file contains 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
1- The problem is to have wide jupyter notebook cells | |
2- jupyter lab is not worth to replace jupyter notebook | |
3- Create this file: | |
~/.jupyter/custom/custom.css | |
4- Add this content: | |
.container {width:100% !important; } |
This file contains 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
1- Migrate a git repo by first mirroring original (ORI) repo: | |
git clone --mirror <url to ORI repo> temp-dir | |
2- Cd to the mirror repo and check local tags and branches: | |
git tag | |
git branch -a | |
3- Remove the link with the original repo: | |
git remote rm origin | |
4- Link the local repo to the new repo: | |
git remote add origin <url to NEW repo> | |
5- Push all branches and tags to the new repo: |
This file contains 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
1- The problem is to find a previous executed command | |
$ history | grep <command_to_be_found> |
This file contains 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
ssh -L <local-port>:<2nd-pc-address>:<2nd-pc-port> <1st-pc-address> | |
= | |
Host target-forwarding | |
Hostname <1st-pc-address> | |
User <1st-pc-username> | |
LocalForward <local-port> <2nd-pc-address>:<2nd-pc-port> | |
IdentityFile <1st-pc-identity-file> | |
# if unix is the gateway (1st-pc) and has its own configuration |
This file contains 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
1- To run an sh script file using current shell, | |
2- where other sh scripts may have been sourced, | |
3- Add a dot and space before running it: | |
$ . <file_to_run.sh> | |
4- To run it creating a new shell use dot slash: | |
$ ./<file_to_run.sh> |
OlderNewer