Skip to content

Instantly share code, notes, and snippets.

View michaelhenrique182's full-sized avatar

Michael Henrique michaelhenrique182

View GitHub Profile
docker rmi $(docker images -q -f dangling=true)
@michaelhenrique182
michaelhenrique182 / jenkins-pipeline.groovy
Created January 12, 2018 17:35 — forked from cyrille-leclerc/jenkins-pipeline.groovy
Jenkins Pipeline Script for maven-release-plugin
#!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']]])
@michaelhenrique182
michaelhenrique182 / angular-interceptors.ts
Created January 4, 2018 12:30
[Angular] Http Interceptors
// Como declarar um interceptor
@NgModule({
imports: [ ..., HttpClientModule ],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: MeuInterceptor, multi: true } // <====
],
...
})
export class ModuloRespectivo {}
@michaelhenrique182
michaelhenrique182 / queryparams-router.ts
Created January 2, 2018 12:03
[Angular] Router Query Params
-- 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 } });
}
<input type="date" [ngModel] ="dt | date:'yyyy-MM-dd'" (ngModelChange)="dt = $event">