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
<input type="date" [ngModel] ="dt | date:'yyyy-MM-dd'" (ngModelChange)="dt = $event"> |
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
-- no template | |
<a [routerLink]="['users']" [queryParams]="{ page: 87 }">Ir para página 87 de usuários</a> | |
-- no componente (ou serviço) | |
goTo(page: number) { | |
this.router.navigate(['/users'], { queryParams: { page: page } }); | |
} | |
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
// Como declarar um interceptor | |
@NgModule({ | |
imports: [ ..., HttpClientModule ], | |
providers: [ | |
{ provide: HTTP_INTERCEPTORS, useClass: MeuInterceptor, multi: true } // <==== | |
], | |
... | |
}) | |
export class ModuloRespectivo {} |
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
#!groovy | |
docker.image('cloudbees/java-build-tools:0.0.6').inside { | |
checkout([$class: 'GitSCM', | |
branches: [[name: '*/master']], | |
extensions: [ | |
/* [$class: 'UserIdentity', email: '[email protected]', name: 'Jenkins as a Service'], */ | |
[$class: 'WipeWorkspace'], | |
[$class: 'LocalBranch', localBranch: 'master']], | |
userRemoteConfigs: [[credentialsId: 'github-credentials', url: 'https://github.com/cyrille-leclerc/my-spring-boot-app.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
docker rmi $(docker images -q -f dangling=true) |
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
# Plain Ol' Node | |
node --max_old_space_size=1024 app.js # increase to 1gb | |
node --max_old_space_size=2048 app.js # increase to 2gb | |
node --max_old_space_size=3072 app.js # increase to 3gb | |
node --max_old_space_size=4096 app.js # increase to 4gb | |
node --max_old_space_size=5120 app.js # increase to 5gb | |
node --max_old_space_size=6144 app.js # increase to 6gb | |
# For pm2 | |
pm2 start app.js --node-args="--max_old_space_size=1024" # increase to 1gb |
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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
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
import {HttpClientModule} from '@angular/common/http'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
BrowserModule, | |
HttpClientModule | |
], |
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
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
# cat paths | |
/_cat/allocation | |
/_cat/shards | |
/_cat/shards/{index} | |
/_cat/master | |
/_cat/nodes | |
/_cat/indices | |
/_cat/indices/{index} |
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
##################### ElasticSearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
# | |
# ElasticSearch comes with reasonable defaults for most settings, |
OlderNewer