Quick tips

Few tips that I use quite often

Script SH

# list files in a directory.
alias ll='ls -alshiv --color=auto'

Ubuntu

Cool theme

sudo add-apt-repository ppa:ravefinity-project/ppa
sudo apt-get update
sudo apt-get install ambiance-flat-colors radiance-flat-colors vivacious-colors

Ref. Vivacious Colors

maven

# create project
mvn archetype:generate
# display versions updates
mvn versions:display-dependency-updates
# use latest versions
mvn versions:use-latest-version
mvn versions:commit

OpooPress

# run locally
mvn clean package op:preview
# add a post
mvn op:new-post -Dtitle="post title" -Dname="post_name" -Dformat=markdown
# deploy
mvn clean package op:deploy

Python

# start a web server
python -m SimpleHTTPServer 8000

Docker

Sonar

# start the server at http://localhost:9000/
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
# use it in a java project
mvn sonar:sonar

PostgreSql

# start the database
docker run -d --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres
# run a psql command line
docker run -it --link some-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'

nodejs, bower, grunt

# start a command line in the current directory.
docker run -it -v $(pwd):/data --rm digitallyseamless/nodejs-bower-grunt