This file contains hidden or 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
| 1 First define a Rx Subject object | |
| private subjectObject = new Subject(); | |
| 2 You can publish an event by using next() method | |
| subjectObject.next(item); | |
| 3 when Subject object publish an event it can be listened by using subscribe |
This file contains hidden or 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
| 1. in build.gradle file add below dependencies: | |
| compile('org.springframework.boot:spring-boot-starter-mail:${springBootVersion}') | |
| compile("org.springframework.boot:spring-boot-starter-freemarker:${springBootVersion}") | |
| 2. in application.properties file add freemarker configurations | |
| spring.freemarker.charset=UTF-8 | |
| spring.freemarker.content-type=text/html | |
| spring.freemarker.template-loader-path=classpath:/templates/ |
This file contains hidden or 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
| # create spring boot container | |
| docker run -d -e "JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n" | |
| -p 8081:8081 | |
| -p 5005:5005 | |
| --name <container name> <image name> | |
| # create debug configuration in intellij | |
| go Run/Debug Configurations | |
| click + button | |
| choose Remote |
This file contains hidden or 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
| # first install plugman | |
| npm install -g plugman | |
| # add native plugin (ex: android plugin) to the ionic project | |
| plugman install --platform <android or ios> --project platforms/<android or ios> --plugin <plugin location (directory or git repo url)> |
This file contains hidden or 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
| userSaveForm.$setPristine(); | |
| $scope.userSaveFormData = {}; |
This file contains hidden or 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
| ng-keyup="$event.keyCode == 13 ? search() : null" |
This file contains hidden or 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
| 1. create git bare repository on your server machine (for example a virtual machine rented from digital ocean) | |
| git init --bare | |
| 2. go hooks folder in git repo that created above and create post-receive.sh file | |
| 3. in post-receive file write below: | |
| #!/usr/bin/env bash |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| TARGET="/opt/backend" | |
| REPO="/opt/backend.git" | |
| TEMP="/tmp/backend" | |
| # Extracting source to temp directory. | |
| rm -rf $TEMP | |
| mkdir -p $TEMP | |
| git --work-tree=$TEMP --git-dir=$REPO checkout -f |
This file contains hidden or 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
| #create a folder | |
| mkdir {git repo folder} | |
| Ex: mkdir /opt/myrepo | |
| #initialize git repository | |
| git init --bare {git repo name}.git | |
| Ex: git init --bare myrepo.git | |
| #create git remote address | |
| git remote add {remote name} {bare repository address}:{folder}/{git repo name}.git |
This file contains hidden or 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
| 1. In application.properties file put below line at the top | |
| spring.profiles.active=@activeProfiles@ | |
| 2. By using above code we will determine the active profile. Then put below code to the build.gradle file in order to | |
| find the related properties file of the selected profile. | |
| processResources { | |
| filesMatching('application.properties') { | |
| filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ |