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
| curl "https://castor.jolicode.com/install" | bash -s -- --install-dir /var/tmp | |
| sudo mv /var/tmp/castor /usr/local/bin |
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
| disable IPv6 | |
| sysctl -w net.ipv6.conf.all.disable_ipv6=1 | |
| sysctl -w net.ipv6.conf.default.disable_ipv6=1 |
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
| # add this to ~/.gitconfig: | |
| [core] | |
| excludesfile = ~/.gitignore | |
| # create ~/.gitignore | |
| .idea |
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
| vue ui --headless --port 8888 --host 0.0.0.0 |
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
| Taille des disques : | |
| df -h | |
| Taille des repertoire: | |
| du /usr -h --max-depth=0 | |
| Fichier de plus de xMo : | |
| find / -type f -size +500000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' |
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
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
| GHBU_ORG=${GHBU_ORG-"yourOrganization"} # the GitHub organization whose repos will be backed up | |
| # (if you're backing up a user's repos instead, this should be your GitHub username) | |
| GHBU_UNAME=${GHBU_UNAME-"YourUser"} # the username of a GitHub account (to use with the GitHub API) | |
| GHBU_PASSWD=${GHBU_PASSWD-"YourPassword"} # the password for that account | |
| GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments) | |
| GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted |
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
| find . -type f -exec grep textearechercher {} \; -printf "%p - %u\n" |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| dbash() { docker exec -u 1000 -it $(docker ps -aqf "name=$1") bash; } | |
| dbashsudo() { docker exec -it $(docker ps -aqf "name=$1") bash; } |
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
| sudo fallocate -l 2G /swapfile | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile |