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
//Print a list of all databases on the server | |
show dbs | |
//Switch or create database | |
use {database} | |
//Print a list of all collections for current database | |
db.getCollectionNames() | |
//Find all documents in the collection and returns a cursor |
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
//Set mysql root password | |
mysqladmin -u root password NEWPASSWORD | |
//Creates a new database | |
create database {databaseName} | |
//Show MySQL version from Workbench | |
SHOW VARIABLES LIKE "%version%"; | |
//Create user |
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
#Open a File | |
Command + Shift + O | |
#Optimize imports in the current file | |
Control + Option + O | |
Control + Alt + O | |
#Duplicate a line | |
Command + D |
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
# Duplicate a line | |
Shift + Option + ArrowDown | |
Alt + Shift + D (To configure) | |
# Move a line | |
Alt + Up | |
Alt + Down | |
Option + Up | |
Option + Down |
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
# Ubuntu | |
//How to see Linux version | |
lsb_release -a | |
cat /etc/centos-release | |
//Add user | |
adduser tomcat | |
//Add user with home directory |
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
## Basic Commands | |
//Clone a project | |
git clone git@github.com:josdem/jmailer-spring-boot.git | |
//Get lastest changes from a project | |
git pull origin master | |
//Commit a change to a project | |
git commit -am "This is a comment about my changes to the project" |
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
#List available node releases | |
nvm ls-remote | |
#Install specific node version | |
nvm install <node_version> | |
#Install LTS release | |
nvm install --lts |
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
//Set proxy environment | |
setx HTTPS_PROXY http://proxy-url:8080 | |
setx HTTP_PROXY http://proxy-url:8080 | |
//Delete a directory | |
Remove-Item ${directory} -Recurse -Force |
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
//Change listen port | |
vim /etc/default/jenkins | |
HTTP_PORT=8081 | |
//Start Jenkins server | |
sudo systemctl start jenkins | |
//Setting NVM and nodeJS command | |
export NVM_DIR="$HOME/.nvm" | |
. ~/.nvm/nvm.sh |
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
[Desktop Entry] | |
Type=Application | |
Name=sts | |
Comment=Spring Tool Suite | |
Icon=/home/josdem/STS/sts-3.7.3.RELEASE/icon.xpm | |
Exec=/home/josdem/STS/sts-3.7.3.RELEASE/STS | |
Terminal=false | |
Categories=Development;IDE;Java; | |
StartupWMClass=STS |
NewerOlder