To set the above:
Editor → Code Style → Groovy/JavaScript
[untick] Use Tab Character Tab Size : 2 Indent : 2 Continuation Indent : 2 [untick] keep indent on empty lines
Editor → General → Auto Import [tick] Optimize imports on the fly.
Shelve Items:
Shelving is temporarily storing pending changes you have not committed yet. This is useful, for example, if you need to switch to another high priority task and you want to set your changes aside to work on them later.
Usage: Version Control Window → Right click on required files → Shelve
Note: This is an alternative to git stash. Shelve can operate with either individual files or bunch of files, while Stash can only operate with a whole bunch of changed files at once.
Preferences- > Editor → File and Code Templates
/***************************************************************
* Copyright (c) ${YEAR} Errigal Inc.
*
* This software is the confidential and proprietary information
* of Errigal, Inc. You shall not disclose such confidential
* information and shall use it only in accordance with the
* license agreement you entered into with Errigal.
*
***************************************************************/
/**
*
* User: ${USER}
* Date: ${DATE}
*/
CodeNarc analyzes your code for defects, bad practices, inconsistencies, style issues and more.
if you don't have mysql installed then run the following command,
brew install mysql-client
if you have MySQL installed, then stop MySQL and then install & use DBDB which is our custom MySQL setup which allows you to seamlessly isolate and switch between customer schemas.
dbdb uses it's own mysqld binary and all the databases and schemas will be stored in ~/.dbdb
You could use Docker instead, but at the moment, Docker on Mac runs on a VM and our applications crawl due to high I/O.
NOTE, ensure all development transform scripts are run when starting an application on a database, WE DON'T WANT CUSTOMERS GETTING NOTIFIED ON DEV DATA
Copy the backups via :
scp scotty@extdb2.ext:/backup/ticketer/ticketer.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/snmp_manager/snmp_manager.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/noc_portal/noc_portal.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/reporting_manager/reporting_manager.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/soap/soap.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/fiber/fiber.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/ebonding/ebonding.Sun.dump.gz ~/Downloads/ scp scotty@extdb2.ext:/backup/content_distributor/content_distributor.Sun.dump.gz ~/Downloads/
These backups are from Extenet
Note some of the small backups do not have any users you may need to get user info for them. The following query would need to be run on a QA or production DB server and the result then loaded in locally :
# Reporting Manager User Dump : mysqldump -ureader -p reporting_manager reporting_shiro_user reporting_shiro_role_permissions reporting_shiro_role reporting_shiro_user_reporting_shiro_role > user.dump
When importing the Database you may encounter issues such as the Database giving an error and saying it has gone away, to resolve this, go into a MySQL terminal and run :
set global max_allowed_packet = 1000000000;
Once done you can then try import the data :
mysql -uroot -p reporting_manager < reporting_manager.Sun.dump
To install SDKman run the following command :
curl -s "https://get.sdkman.io" | bash
Once installed, open a new terminal, download appropriate Groovy, Grails and Java
sdk list java sdk list grails sdk list groovy sdk install java VERSION sdk install grails VERSION sdk install groovy VERSION
NOTE, if you want to swap the current version of Groovy, Java etc being run in the terminal you can run
sdk use PACKAGE VERSION
e.g.
sdk use grails 2.5.6
CMD+Shift+A : Search for any command Press Shift Twice : Search Everywhere CMD+O : go to class CMD+B : go to declaration CTRL+T : Refactor Menu Pop [Rename,Move,Safe delete etc] CMD+ALT+L : Auto Indent Code
CMD+K : Commit project to VCS CMD+T : Update project from VCS CMD+SHIFT+K : Push Commits CMD+D : on the Change File to view Diff
use Cheatsheet: https://www.mediaatelier.com/CheatSheet/