Skip to content

Instantly share code, notes, and snippets.

View ICD10CM-sample.xml
<?xml version="1.0" encoding="utf-8"?>
<ICD10CM.index>
<version>2020</version>
<title>ICD-10-CM INDEX TO DISEASES and INJURIES</title>
<letter>
<title>A</title>
<mainTerm>
<title>Aarskog's syndrome</title>
<code>Q87.19</code>
</mainTerm>
View question.txt
Programming questions
---------------------
1)
Write a program that prints the numbers from 1 to 100.
But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.
For numbers which are multiples of both three and five print “FizzBuzz”."
2)
View bash
curl -s https://www.docdoc.com.sg/medicaltourism_sitemap_profile_1.xml.gz | zcat | xq -r '.urlset.url | map(.loc) | .[]' | sed -e 's/\.com/\.com\.sg/' | xargs curl --user-agent "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" -s -I -L --write-out "============== END ==============\n" | tee medicaltourism_sitemap_profile_1_crawl.txt
View jenkins
pipeline {
agent any
environment {
NETWORK_NAME = "nextgen-backend-testnet-${BRANCH_NAME.toLowerCase()}-b${BUILD_NUMBER}"
BUILD_NAME = "nextgen-test/${BRANCH_NAME.toLowerCase()}:B${BUILD_NUMBER}"
}
stages {
stage('Build') {
steps {
echo "Docker network name: ${NETWORK_NAME}"
View login.component.ts
import { Component, OnInit } from '@angular/core';
import {FormGroup, Validators, FormBuilder} from '@angular/forms';
import { Router } from '@angular/router';
import { AuthService } from '../auth.service';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
@zkkmin
zkkmin / FORMGROUP-login.component.html
Created Oct 12, 2018
Form group control in login component template
View FORMGROUP-login.component.html
<section class="hero ">
<div class="hero-body">
<div class="container">
<div class="column is-8 is-offset-2">
<div>
<h3 class="title has-text-grey">Login</h3>
<p class="subtitle has-text-grey">Please login to proceed.</p>
<div class="box">
<div class="notification is-danger" [hidden]="!error">
@zkkmin
zkkmin / app.module.ts
Created Oct 12, 2018
App Module for JWT Angular
View app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { LoginComponent } from './login/login.component';
import { ReactiveFormsModule } from '@angular/forms'; // Reactive form module added
import { AppRoutingModule } from './/app-routing.module';
import { DashboardComponent } from './dashboard/dashboard.component';
@zkkmin
zkkmin / app-routing.module.ts
Created Oct 11, 2018
App router for module
View app-routing.module.ts
import { NgModule } from '@angular/core';
import { RouterModule, Route } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { DashboardComponent } from './dashboard/dashboard.component';
const routes = [
{ path: 'login', component: LoginComponent },
{ path: 'dashboard', component: DashboardComponent }
]
@zkkmin
zkkmin / login.component.html
Last active Oct 11, 2018
Login component template
View login.component.html
<section class="hero ">
<div class="hero-body">
<div class="container">
<div class="column is-8 is-offset-2">
<div>
<h3 class="title has-text-grey">Login</h3>
<p class="subtitle has-text-grey">Please login to proceed.</p>
<div class="box">
<div class="notification is-danger" [hidden]="!error">
@zkkmin
zkkmin / auth.service.ts
Created Oct 10, 2018
Auth service with JWT token
View auth.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { catchError, tap } from 'rxjs/operators';
import * as moment from 'moment';
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json'})
}
You can’t perform that action at this time.