Skip to content

Instantly share code, notes, and snippets.

View filipeandre's full-sized avatar

Filipe Ferreira filipeandre

View GitHub Profile
@filipeandre
filipeandre / backup.sh
Last active May 8, 2018 16:13
Simple commands to backup
# Zip and compress folder
tar -cjf /mysql.tar.bz2 .
# Restore folder
tar -C . -xjf /mysql.tar.bz2
@filipeandre
filipeandre / dockercmd.sh
Last active May 8, 2018 16:25
Docker commands
# Copy files from host to container and vice versa
docker cp src/. $container:/target
docker cp $container:/src/. target
# Exec an command on a running container
docker exec -it $container $command
# List all containers running or not
docker ps -a
@filipeandre
filipeandre / select-login-theme.sh
Last active May 8, 2018 20:51
Set gdm login screen from existing themes
sudo update-alternatives --config gdm3.css
@filipeandre
filipeandre / update-npm.sh
Created May 9, 2018 16:33
Update npm to the last version
sudo npm install npm@latest -g
@filipeandre
filipeandre / dropbox.desktop
Last active May 9, 2018 21:36
Tiny dropbox fix to show app indicator in gnome ~/.local/share/applications
[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=env XDG_CURRENT_DESKTOP=Unity dropbox start -i
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
@filipeandre
filipeandre / find-aplication-shortcurts.sh
Created May 9, 2018 21:25
Find all aplication shortcurts
find / -type f -name '*.desktop' 2>/dev/null | less
@filipeandre
filipeandre / skype_skypeforlinux.desktop
Last active May 9, 2018 21:37
Fix gnome indicator ~/.local/share/applications
[Desktop Entry]
Name=Skype
Comment=Skype Internet Telephony
Exec=env XDG_CURRENT_DESKTOP=Unity /snap/bin/skype %U
Icon=/snap/skype/30/meta/gui/skypeforlinux.png
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=Skype
Categories=Network;Application;
@filipeandre
filipeandre / install_alsamixer.sh
Created May 10, 2018 11:30
Gnome sound extra
sudo apt-get install gnome-alsamixer
sudo apt-get install pavucontrol
@filipeandre
filipeandre / git_lf.sh
Created May 10, 2018 14:33
Configure git to only use linux line endings
git config --global core.autocrlf auto
git config --global core.eol lf
@filipeandre
filipeandre / docker_mysql_client.sh
Created May 10, 2018 15:27
Run mysql container terminal
docker run -it --rm --tty --entrypoint=/bin/sh arey/mysql-client