Thursday, August 4, 2016

How to install printer Dymo LabelWriter 450 on Ubuntu 14.04

Download driver

List of drives.

Follow the instructions in the INSTALL file.

You might need to install some CUPS dependencies:


sudo apt-get install libcups2-dev
sudo apt-get install libcupsimage2-dev

From: https://ubuntuforums.org/showthread.php?t=1502581

Thursday, May 19, 2016

Ubuntu 14.04 lts "The system network services are not compatible with this version"

No network error

http://askubuntu.com/questions/727988/the-system-network-services-are-not-compatible-with-this-version-ubuntu-14-0

Friday, November 20, 2015

Tuesday, October 27, 2015

How to colorify GIT

Add the following tags to your ~/.gitconfig file:

[color]
        diff = auto
        status = auto
        branch = auto
        interactive = auto
From https://glance-stage.cern.ch/wiki/doku.php?id=git:configuration

Friday, October 16, 2015

How to create terminal alias / shortcuts / hotkeys

Edit the file:
vim ~/.bashrc

add the aliases. Mine were:

alias gs='git status'
alias ga='git add'
alias gb='git branch'
alias gc='git commit'
alias gca='git commit --amend'
alias gd='git diff'
alias gdc='git diff --cached'
alias gch='git checkout'
alias gl='git lg1'
alias gpl='git pull'
alias gps='git push'
alias gpssu='git push --set-upstream'
alias gmn='git merge --no-ff'
alias grh='git reset HEAD'

Windows

alias gsh='git show HEAD'

Linux

function gsh() {
    git show HEAD$1
}

function lucas() {
    cd /srv/lucas$1
}

function dev() {
    cd /srv$1
}
Execute the file to make the changes work:
. ~/.bashrc


From:
http://githowto.com/aliases
http://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias

Add alias auto completion:
Now its time for adding the auto completion to your alias:

wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
mv git-completion.bash .git-completion.bash
vim .bash_profile

Add the following content to the file:
# add alies auto completion
source ~/.git-completion.bash
__git_complete gch _git_checkout
__git_complete gb _git_branch
__git_complete gmn _git_merge

Now just reboot shell and enjoy your auto completion :)

From:
http://stackoverflow.com/questions/342969/how-do-i-get-bash-completion-to-work-with-aliases

Friday, August 28, 2015

How to create a linux bash script to automatic ssh

Install sshpass software

sudo apt-get install sshpass

Create an executable file YOUR_FILE.sh, with the following content:

#!/bin/bash
sshpass -p "YOUR_PASSWORD" ssh -o StrictHostKeyChecking=no YOUR_USERNAME@SERVER_ADDRESS


Make it executable
sudo chmod +x <filename> 

Now just execute:
./YOUR_FILE.sh