<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anjum Nawab &#8211; Otricks.com</title>
	<atom:link href="https://otricks.com/author/anjumotricks-com/feed/" rel="self" type="application/rss+xml" />
	<link>https://otricks.com</link>
	<description>It&#039;s the big &#039;O&#039; in technology</description>
	<lastBuildDate>Sun, 09 Jan 2022 20:40:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Steps to open port 25 on EC2 instance &#8211; Amazon web service (AWS)</title>
		<link>https://otricks.com/steps-to-open-port-25-on-ec2-instance-amazon-web-service-aws/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Sun, 09 Jan 2022 08:51:51 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2420</guid>

					<description><![CDATA[<p>When you create new EC2 instance (server) on AWS you own everything, including what is open to public and what is not, with one exception&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/steps-to-open-port-25-on-ec2-instance-amazon-web-service-aws/">Steps to open port 25 on EC2 instance &#8211; Amazon web service (AWS)</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When you create new EC2 instance (server) on AWS you own everything, including what is open to public and what is not, with one exception port 25, You can&#8217;t open this port without AWS help. They have valid reasons to block it, as some bad people use EC2 to spam. </p>



<p>You can open other ports using &#8212;&gt; Network &amp; Security  &#8212;&gt; Security Groups</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.44.28-AM-983x1024.png" alt="" class="wp-image-2421"/></figure>



<h2 class="wp-block-heading">Request to open </h2>



<p>Goto top right side inside AWS account, and click on ? mark icon, it will open dropdown and click on<strong><em> support center</em></strong>.</p>



<p> </p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="797" src="https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.56.18-AM-1024x797.png" alt="" class="wp-image-2454" srcset="https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.56.18-AM-1024x797.png 1024w, https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.56.18-AM-300x234.png 300w, https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.56.18-AM-768x598.png 768w, https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-11.56.18-AM.png 1444w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>It will take you to AWS Support Center page. click on <a href="https://console.aws.amazon.com/support/home#/case/create">Create case</a> it will take you to the page with three radio button options, you need to select <strong><em>Server limit increase </em></strong>it will open search field, you will need to search with &#8220;ec2 email&#8221; and last click on EC2 email external link, as shown in below image.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-12.04.06-PM-1024x583.png" alt="" class="wp-image-2424"/></figure>



<p>You need to provide details like below.</p>



<p></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hello Amazonian</p><p>I will use Amazon SES to send email to reset passwords in case they request password reset. The email will always have an unsubscribe link that they can request to be removed from our list.</p><p>My web server is based in openSource technology which comes with below services to protect from spamming etc<br>Amavisd-new,<br>SpamAssassin,<br>ClamAV<br>Kindly approve my request for Amazon SES production access in the above mentioned region. Let me know if you have any questions.</p><p>Thanks</p></blockquote>



<figure class="wp-block-image size-large"><img decoding="async" src="https://otricks.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-09-at-12.11.41-PM-790x1024.png" alt="" class="wp-image-2425"/></figure>



<p>They are very fast to response, I often get in without 1 hour.</p>



<p>Hope you like this small post, if its helpful please share it on social media. </p>



<p></p>



<p>You may like other post too </p>



<p></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow"><ul class="wp-block-latest-posts__list is-grid columns-3 wp-block-latest-posts"><li><a class="wp-block-latest-posts__post-title" href="https://otricks.com/steps-to-open-port-25-on-ec2-instance-amazon-web-service-aws/">Steps to open port 25 on EC2 instance &#8211; Amazon web service (AWS)</a></li>
<li><a class="wp-block-latest-posts__post-title" href="https://otricks.com/create-front-end-app-for-space-xyz-cargo-booking-system/">Create front-end app for space-XYZ cargo booking system.</a></li>
<li><a class="wp-block-latest-posts__post-title" href="https://otricks.com/how-to-use-websocket-socket-io-inside-strapi-content-management-system/">How to use webSocket/Socket.io inside Strapi content management system.</a></li>
<li><a class="wp-block-latest-posts__post-title" href="https://otricks.com/how-to-delete-mysql-binlog-files-if-you-dont-have-disk-space-left/">How to delete MySQL binlog files if you don&#8217;t have disk space left</a></li>
<li><a class="wp-block-latest-posts__post-title" href="https://otricks.com/responsiveness-in-reactive-programming/">Reactive Programming : Understanding Responsiveness</a></li>
</ul></div></div>
</div>
</div>
<p>The post <a rel="nofollow" href="https://otricks.com/steps-to-open-port-25-on-ec2-instance-amazon-web-service-aws/">Steps to open port 25 on EC2 instance &#8211; Amazon web service (AWS)</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create front-end app for space-XYZ cargo booking system.</title>
		<link>https://otricks.com/create-front-end-app-for-space-xyz-cargo-booking-system/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Wed, 29 Dec 2021 12:44:48 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Nodejs]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2378</guid>

					<description><![CDATA[<p>This is multi-part post and this is 2 or 3 part. Our base design would be like space-x website with header, background image and some&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/create-front-end-app-for-space-xyz-cargo-booking-system/">Create front-end app for space-XYZ cargo booking system.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is multi-part post and this is 2 or 3 part.</p>



<p>Our base design would be like space-x website with header, background image and some text, we will create a full functional strapi server from where all data comes eventually. For now we will create dummy text and dummy image placeholder, later we will integrate with API from strapi.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="561" src="https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-1024x561.png" alt="" class="wp-image-2388" srcset="https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-1024x561.png 1024w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-300x164.png 300w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-768x421.png 768w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-1536x842.png 1536w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-20-at-11.27.23-PM-2048x1123.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Create new empty folder and name it <strong><em>space-xyz</em></strong> then cd into it, open terminal window I will be using <a rel="noreferrer noopener" href="https://iterm2.com/" target="_blank">iTerm2</a> for my terminal window and run below command it will generate new angular project.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="13" data-lines="5" data-showlines="true" data-copy="true">npx -p  @angular/cli@10.2.1 ng new space-xyz </pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="13" data-lines="20" data-showlines="true" data-copy="false">? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS   [ https://sass-lang.com/documentation/syntax#scss                ]
CREATE space-xyz/README.md (1017 bytes)
CREATE space-xyz/.editorconfig (274 bytes)
CREATE space-xyz/.gitignore (631 bytes)
CREATE space-xyz/angular.json (3678 bytes)
CREATE space-xyz/package.json (1252 bytes)
CREATE space-xyz/tsconfig.json (458 bytes)
CREATE space-xyz/tslint.json (3185 bytes)
CREATE space-xyz/.browserslistrc (853 bytes)
CREATE space-xyz/karma.conf.js (1021 bytes)
CREATE space-xyz/tsconfig.app.json (287 bytes)
CREATE space-xyz/tsconfig.spec.json (333 bytes)
CREATE space-xyz/src/favicon.ico (948 bytes)
CREATE space-xyz/src/index.html (294 bytes)
CREATE space-xyz/src/main.ts (372 bytes)
CREATE space-xyz/src/polyfills.ts (2830 bytes)
CREATE space-xyz/src/styles.scss (80 bytes)
CREATE space-xyz/src/test.ts (753 bytes)
CREATE space-xyz/src/assets/.gitkeep (0 bytes)
CREATE space-xyz/src/environments/environment.prod.ts (51 bytes)
CREATE space-xyz/src/environments/environment.ts (662 bytes)
CREATE space-xyz/src/app/app-routing.module.ts (245 bytes)
CREATE space-xyz/src/app/app.module.ts (393 bytes)
CREATE space-xyz/src/app/app.component.scss (0 bytes)
CREATE space-xyz/src/app/app.component.html (25757 bytes)
CREATE space-xyz/src/app/app.component.spec.ts (1066 bytes)
CREATE space-xyz/src/app/app.component.ts (214 bytes)
CREATE space-xyz/e2e/protractor.conf.js (869 bytes)
CREATE space-xyz/e2e/tsconfig.json (294 bytes)
CREATE space-xyz/e2e/src/app.e2e-spec.ts (642 bytes)
CREATE space-xyz/e2e/src/app.po.ts (301 bytes)
&#x2714; Packages installed successfully.
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch &lt;name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m &lt;name>
    Successfully initialized git.</pre></div>



<p>Open frontend project in your favorite code editor, I will be using visual studio code (vscode) its super fast and build on node stack too.</p>



<p>We will generate header component user angular CLI command, It will be very simple header to hold our navigation and logo for our application.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="13" data-lines="5" data-showlines="true" data-copy="true">npx ng generate component header </pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="10" data-showlines="true" data-copy="false">? Would you like to share anonymous usage data about this project with the Angular Team at
Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more
details and how to change this setting, see http://angular.io/analytics. Yes

Thank you for sharing anonymous usage data. Would you change your mind, the following
command will disable this feature entirely:

    ng analytics project off

CREATE src/app/header/header.component.scss (0 bytes)
CREATE src/app/header/header.component.html (21 bytes)
CREATE src/app/header/header.component.spec.ts (626 bytes)
CREATE src/app/header/header.component.ts (276 bytes)
UPDATE src/app/app.module.ts (475 bytes)</pre></div>



<p>Insider header component &#8220;<strong><em>header/header.component.html</em></strong>&#8221; </p>



<p>We will use our server to provide all the data for now we will just use as place holder.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="html" data-theme="monokai" data-fontsize="13" data-lines="Infinity" data-showlines="true" data-copy="true">&lt;div class="header-holder">
  &lt;div class="logo">
    &lt;h1>Space-XYZ&lt;/h1>
  &lt;/div>
  &lt;div class="menu">
    &lt;ul>
      &lt;li>
        &lt;a routerLink="/first-component" routerLinkActive="active">link 1&lt;/a>
      &lt;/li>
      &lt;li>
        &lt;a routerLink="/first-component" routerLinkActive="active">link 2&lt;/a>
      &lt;/li>
      &lt;li>
        &lt;a routerLink="/first-component" routerLinkActive="active">link 3&lt;/a>
      &lt;/li>
      &lt;li>
        &lt;a routerLink="/first-component" routerLinkActive="active">link 4&lt;/a>
      &lt;/li>
      &lt;li>
        &lt;a routerLink="/first-component" routerLinkActive="active">link 5&lt;/a>
      &lt;/li>
    &lt;/ul>
  &lt;/div>
&lt;/div>
</pre></div>



<p>Let&#8217;s create body component to hold some text and other data.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">npx ng generate component body </pre></div>



<p>Insider body component &#8220;<strong><em>body/body.component.html</em></strong>&#8220;</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="html" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">&lt;div class="body-holder">
  &lt;h1>Some Name comes form server&lt;/h1>
  &lt;p>Some text comes from server&lt;/p>
  &lt;a href="">Book it now&lt;/a>
&lt;/div></pre></div>



<p>Insider body component &#8220;<strong><em>body/body.component.scss</em></strong>&#8220;</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="scss" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">// body/body.component.scss

.body-holder {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 15%;

  h1 {
    font-size: 60px;
    text-transform: uppercase;
    color: #fff;
  }

  p {
    color: #fff;
    text-transform: uppercase;
  }
  a {
    text-decoration: none;
    background: green;
    border: 1px solid #037203;
    color: #fff;
    padding: 20px;
    font-size: 16px;
    text-transform: uppercase;
  }
}
</pre></div>



<p>Update routing &#8220;<strong><em>app-routing.module.ts</em></strong>&#8221; file with below code.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="typescript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">// app-routing.module.ts

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { BodyComponent } from './body/body.component';

const routes: Routes = [
  {
    path: ':id',
    component: BodyComponent,
  },
  {
    path: '',
    component: BodyComponent,
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
})
export class AppRoutingModule {}
</pre></div>



<p>Update app component  &#8220;<strong><em>app.component.html</em></strong>&#8221; file  and &#8220;<strong><em>app.component.ts&#8221; </em></strong>with below code. Later we will get background image from API response, for now we are hardcoding <strong><em>backgroundImage</em></strong> path </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="html" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">&lt;!--app.component.html-->

&lt;div
  class="body"
  [ngStyle]="{
    background:
      'url(' + backgroundImage + ') #000 no-repeat center bottom / contain'
  }"
>
  &lt;div class="container">
    &lt;app-header>&lt;/app-header>
    &lt;router-outlet>&lt;/router-outlet>
  &lt;/div>
&lt;/div>
</pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="typescript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">// app.component.ts

import { Component } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  title = 'space-xyz';
  backgroundImage = null;

  constructor() {
    this.backgroundImage = '../../assets/f9_feature.webp';
  }
}
</pre></div>



<p>And last update &#8220;<strong><em>app.module.ts</em></strong>&#8221; to reflect those changes.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="typescript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">//app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { BodyComponent } from './body/body.component';

@NgModule({
  declarations: [AppComponent, HeaderComponent, BodyComponent],
  imports: [BrowserModule, AppRoutingModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}</pre></div>



<p>Finally run angular application to view our frontend app. You will be able to see something like below screen shot. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="730" src="https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-1024x730.png" alt="" class="wp-image-2392" srcset="https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-1024x730.png 1024w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-300x214.png 300w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-768x547.png 768w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-1536x1095.png 1536w, https://otricks.com/wp-content/uploads/2021/12/Screen-Shot-2021-12-28-at-9.48.35-PM-2048x1460.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>For some reason if you miss any step you can check <a rel="noreferrer noopener" href="https://github.com/anjum121/space-xyz/tree/master/fontend" target="_blank">https://github.com/anjum121/space-xyz/tree/master/fontend</a> link for final code.</p>



<p>Next step is to create Strapi system, let&#8217;s go to backend part. 🙂 </p>
<p>The post <a rel="nofollow" href="https://otricks.com/create-front-end-app-for-space-xyz-cargo-booking-system/">Create front-end app for space-XYZ cargo booking system.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use webSocket/Socket.io inside Strapi content management system.</title>
		<link>https://otricks.com/how-to-use-websocket-socket-io-inside-strapi-content-management-system/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Wed, 29 Dec 2021 12:39:28 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Nodejs]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2369</guid>

					<description><![CDATA[<p>What is WebSocket? WebSocket is very useful pice of technology to communicate seamlessly from server to client, unlike HTTP it use full-duplex data transmission meaning, data&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-use-websocket-socket-io-inside-strapi-content-management-system/">How to use webSocket/Socket.io inside Strapi content management system.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading"><strong>What is WebSocket?</strong></h3>



<p>WebSocket is very useful pice of technology  to communicate seamlessly from server to client, unlike HTTP it use full-duplex data transmission meaning,  data can be transmitted in both directions on a signal carrier at the same time. To interact with webSocket we can use <a rel="noreferrer noopener" href="http://socket.io" target="_blank">socket.io</a> library which hides most of the stuff and provide clean API.</p>



<h3 class="wp-block-heading"><strong>What is strapi? </strong></h3>



<p>It&#8217;s headless content management system, if this headless makes no sense then think like <a href="https://wordpress.org/" target="_blank" rel="noreferrer noopener">wordpress</a> or <a href="https://www.joomla.org/">Joomla</a>  content management systems (cms) they comes with themes which user can install and see something in action, however in headless CMS there are no theme system, user needs to create their own theme for website or they can consume data on mobile apps.</p>



<p><a rel="noreferrer noopener" href="https://strapi.io/" target="_blank">Strapi</a> is open source nodejs based system, its based on <a rel="noreferrer noopener" href="https://koajs.com/" target="_blank">Koa.js.com</a> or follows same style of coding. Its comes with Rest API as well as <a rel="noreferrer noopener" href="https://graphql.org/" target="_blank">graphql</a> support too.</p>



<p>I don&#8217;t want to create chat-room example for this guide. May be We can create to booking system to send payload to Mars using <a rel="noreferrer noopener" href="https://www.spacex.com/vehicles/dragon/" target="_blank">space-x</a> shuttle service, where user can book a cargo in the space-x rocket once space is allocated from space-x&#8217;s team, the user will get notification via WebSocket about cargo space. </p>



<p>It&#8217;s going to be very long post, hence I will create it in multiple steps. I will be pushing code to Github in every step so do checkout all the steps of the code.</p>



<h3 class="wp-block-heading">I will try to implement following </h3>



<ul class="wp-block-list"><li>Create Angular application for frontend system (FE).</li><li>Create user login (FE)</li><li>Create protected route (FE)</li><li>Create Strapi application for backend system (BE).</li><li>Create sample API (BE).</li><li>Create dummy user (BE).</li><li>Start communication from Angular application to Strapi application.</li><li>Identify user and based on user send socket messages.</li></ul>



<p>Lets start building our frontend system first, I will call our fictional cargo booking company. space-XYZ .</p>



<p>Please click her to checkout frontend system.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-use-websocket-socket-io-inside-strapi-content-management-system/">How to use webSocket/Socket.io inside Strapi content management system.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to delete MySQL binlog files if you don&#8217;t have disk space left</title>
		<link>https://otricks.com/how-to-delete-mysql-binlog-files-if-you-dont-have-disk-space-left/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Thu, 23 Apr 2020 05:47:40 +0000</pubDate>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2351</guid>

					<description><![CDATA[<p>MySql does some really stupid stuff, often I feel like it&#8217;s no MY-SQL it SOMEONE-ELSE-SQL. Maybe it has some valid reasoning behind it, which I&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-delete-mysql-binlog-files-if-you-dont-have-disk-space-left/">How to delete MySQL binlog files if you don&#8217;t have disk space left</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>MySql does some really stupid stuff, often I feel like it&#8217;s no MY-SQL it SOMEONE-ELSE-SQL. Maybe it has some valid reasoning behind it, which I don&#8217;t know completely yet. One issue which often people encountered is  MySql binlog files.</p>



<p>These binlog files are very storage-intensive, most of the time for a small application each binlog file will be around 1.2GB.</p>



<p>Now imagine if you have 20GB disk-space it will eat up pretty much everything to the point where not a single kb is remaining for the server, if such thing happens, we even can&#8217;t run small commands like opening a file or editing a file etcetera.</p>



<p>As you can see in below image where It uses 100% of disk space 🙁  </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="531" src="https://otricks.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-23-at-9.03.10-1024x531.png" alt="" class="wp-image-2352" srcset="https://otricks.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-23-at-9.03.10-1024x531.png 1024w, https://otricks.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-23-at-9.03.10-300x156.png 300w, https://otricks.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-23-at-9.03.10-768x398.png 768w, https://otricks.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-23-at-9.03.10.png 1072w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Some blog suggested that we can delete those files using <code>myql></code> in terminal, however if you don&#8217;t have any space left we can&#8217;t even run <code>sql</code> in terminal.</p>



<h2 class="wp-block-heading">The right way to remove binlog files.</h2>



<p>If you are a root user to the system you can do following things to get it deleted in proper way.</p>



<p>login to the system via ssh and run below command, it will make you root user.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">sudo -su</pre></div>



<p>Run <code>df -h</code> to check current disk space information, it will show you something like below. check <code>/dev/xvda1</code> section it consume all the space which I have it 🙁</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">Filesystem      Size  Used Avail Use% Mounted on
udev            236M     0  236M   0% /dev
tmpfs            49M  5.7M   44M  12% /run
/dev/xvda1       20G   20G     0 100% /
tmpfs           244M     0  244M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           244M     0  244M   0% /sys/fs/cgroup
/dev/loop0       92M   92M     0 100% /snap/core/8689
/dev/loop1       18M   18M     0 100% /snap/amazon-ssm-agent/1480
/dev/loop2       18M   18M     0 100% /snap/amazon-ssm-agent/1566
/dev/loop4       94M   94M     0 100% /snap/core/8935
tmpfs            49M     0   49M   0% /run/user/1000</pre></div>



<p>To get more information about your database usage you can run du -hs <code>/opt/bitnami/mysql/data</code> for me, it&#8217;s 16 bg, which is way too much for small application.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">16G	/opt/bitnami/mysql/data</pre></div>



<p>To check all the big files (in space allocation) run below command, it will show list of culprits </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">du -hs /opt/bitnami/*/*/* |sort -rh | head -35</pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">1.1G	/opt/bitnami/mysql/data/binlog.000017
1.1G	/opt/bitnami/mysql/data/binlog.000016
1.1G	/opt/bitnami/mysql/data/binlog.000015
1.1G	/opt/bitnami/mysql/data/binlog.000014
1.1G	/opt/bitnami/mysql/data/binlog.000013
1.1G	/opt/bitnami/mysql/data/binlog.000012
1.1G	/opt/bitnami/mysql/data/binlog.000011
1.1G	/opt/bitnami/mysql/data/binlog.000010
1.1G	/opt/bitnami/mysql/data/binlog.000009
1.1G	/opt/bitnami/mysql/data/binlog.000008
1.1G	/opt/bitnami/mysql/data/binlog.000007
1.1G	/opt/bitnami/mysql/data/binlog.000006
1.1G	/opt/bitnami/mysql/data/binlog.000003
1.0G	/opt/bitnami/mysql/data/binlog.000018
569M	/opt/bitnami/mysql/data/binlog.000004</pre></div>



<p>At this point you even can&#8217;t open file via <code>nano etc.txt</code> or preform any other operation in the system as no space is left.</p>



<p>You can delete <code>binlog.000001</code> to get some space, run <code>rm binlog.000001</code> once it&#8217;s deleted  you will be able to run <code>nano</code> command.</p>



<p>Now open binlog.index file using  <code>nano binlog.index</code> and remove all the entries of binlog.0xxx from binlog.index file, once done save it and exit.</p>



<p>Run below to remove all fu(king binlog files at once, if you want you can remove <code>mysqld.log</code> files to as it might not be any use. </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">rm binlog.00*</pre></div>



<p>After this if you run <code>df -h</code> you will get your space back. check <code>/dev/xvda1</code> section 🙂</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">Filesystem      Size  Used Avail Use% Mounted on
udev            236M     0  236M   0% /dev
tmpfs            49M  5.7M   44M  12% /run
/dev/xvda1       20G  4.4G   15G  23% /
tmpfs           244M     0  244M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           244M     0  244M   0% /sys/fs/cgroup
/dev/loop0       92M   92M     0 100% /snap/core/8689
/dev/loop1       18M   18M     0 100% /snap/amazon-ssm-agent/1480
/dev/loop2       18M   18M     0 100% /snap/amazon-ssm-agent/1566
/dev/loop4       94M   94M     0 100% /snap/core/8935
tmpfs            49M     0   49M   0% /run/user/1000</pre></div>



<p>Hope this will be helpful to someone.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p> I go beyond boundaries that trap me. Attachments and limitations in thinking are removed and I see people as actors playing roles sometimes negative and sometimes positive and scenes as passing phases, sometimes negative and sometimes positive. This experience translates into power in the consciousness as well as in words and actions.</p></blockquote>



<p>You may check other informative article  https://otricks.com/responsiveness-in-reactive-programming/ </p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-delete-mysql-binlog-files-if-you-dont-have-disk-space-left/">How to delete MySQL binlog files if you don&#8217;t have disk space left</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to implement SSL Pinning in Ionic 5?</title>
		<link>https://otricks.com/how-to-implement-ssl-pinning-in-ionic-5-or-html5-app/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Thu, 26 Mar 2020 20:08:04 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mobile Apps]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2135</guid>

					<description><![CDATA[<p>When we develop ionic or HTML5 hybrid application often we ignore some of the goofy security stuff, however, when a client wants to do security&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-implement-ssl-pinning-in-ionic-5-or-html5-app/">How to implement SSL Pinning in Ionic 5?</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When we develop ionic or HTML5 hybrid application often we ignore some of the goofy security stuff, however, when a client wants to do security testing checkup, we need to implement many things which we really don&#8217;t care at the time of development, one of such thing is <a rel="noreferrer noopener" aria-label="SSL Pinning (opens in a new tab)" href="https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning" target="_blank">SSL Pinning</a> </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The pinning is an optional mechanism that can be used to improve the security of a service or site that relies on SSL Certificates. Pinning allows you to specify a cryptographic identity that should be accepted by users visiting your website </p></blockquote>



<p>It&#8217;s a two-part process, first, we need to get a certificate from our API server where we host our backend services. second,  we will need to implement SSL Pinning in the ionic app. Without further ado, let&#8217;s start the first part: </p>



<h2 class="wp-block-heading">Step 1: Get the SSL Certificate from API Server.</h2>



<p>Let&#8217;s pretend that our API server is <a rel="noreferrer noopener" aria-label="otricks.com (opens in a new tab)" href="https://otricks.com/" target="_blank">otricks.com</a> we can get an SSL certificate for the same, I will show you a very easy way to get it via <a rel="noreferrer noopener" aria-label="Firefox (opens in a new tab)" href="https://www.mozilla.org/en-US/firefox/new/" target="_blank">Firefox</a> browser.</p>



<p>Go to otricks.com or your API endpoint with https </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="474" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03-1024x474.png" alt="" class="wp-image-2138" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03-1024x474.png 1024w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03-300x139.png 300w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03-768x355.png 768w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03-1536x711.png 1536w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.03.png 1906w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large border: 1px solid #ddd"><img loading="lazy" decoding="async" width="1024" height="597" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28-1024x597.png" alt="" class="wp-image-2139" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28-1024x597.png 1024w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28-300x175.png 300w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28-768x448.png 768w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28-1536x896.png 1536w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.28.png 1914w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="743" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-1024x743.png" alt="" class="wp-image-2140" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-1024x743.png 1024w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-300x218.png 300w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-768x557.png 768w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-1536x1114.png 1536w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-19.20.42-2048x1485.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>When you click on PEM(cert), it will download <strong><em>otricks-com.pem</em></strong> file which you can convert it to <strong><em>filename.cer</em></strong>  file extension. You need to have <a rel="noreferrer noopener" aria-label="OpenSSL (opens in a new tab)" href="https://www.openssl.org/" target="_blank">OpenSSL</a> tool install in your machine, I have it already in my Macbook Pro. You can google it and install it.</p>



<p>Open a terminal window and run below command which will convert <code>.pem</code> a file to <code>.cer</code> file, change &#8220;nameOfPemFile.pem &#8221; with your file and adjust the path accordingly. Once you run below command it will convert your <strong><em><code>pem</code></em></strong> file to <strong><em><code>cer</code></em></strong> file which we need for our next step.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">openssl x509 -inform PEM -in /Users/anjum/Downloads/nameOfPemFile.pem -outform DER -out /Users/anjum/Downloads/certificate.cer
</pre></div>



<h2 class="wp-block-heading">Step 2: Create a new Ionic 5 project.</h2>



<p>Let&#8217;s create a new empty project with the Ionic CLI tool</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="powershell" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">ionic start sslpinning tabs
</pre></div>



<p>Open the project and edit the angular.json file add certificates block something like below. check app =&gt; architect =&gt; build =&gt; assets section.  This way Angular will copy our <code>certificates</code> inside <code>www</code> folder of ionic when we build project</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">{
    "glob": "**/*",
    "input": "src/certificates",
    "output": "certificates"
},</pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="10" data-showlines="true" data-copy="false">{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "defaultProject": "app",
  "newProjectRoot": "projects",
  "projects": {
    "app": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "app",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "www",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
              {
                "glob": "**/*",
                "input": "src/certificates",
                "output": "certificates"
              },
              {
                "glob": "**/*.svg",
                "input": "node_modules/ionicons/dist/ionicons/svg",
                "output": "./svg"
              }
            ],
            "styles": [
              {
                "input": "src/theme/variables.scss"
              },
              {
                "input": "src/global.scss"
              }
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                }
              ]
            },
            "ci": {
              "progress": false
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            },
            "ci": {
              "progress": false
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "app:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.spec.json",
            "karmaConfig": "karma.conf.js",
            "styles": [],
            "scripts": [],
            "assets": [
              {
                "glob": "favicon.ico",
                "input": "src/",
                "output": "/"
              },
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "/assets"
              }
            ]
          },
          "configurations": {
            "ci": {
              "progress": false,
              "watch": false
            }
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "tsconfig.app.json",
              "tsconfig.spec.json",
              "e2e/tsconfig.json"
            ],
            "exclude": ["**/node_modules/**"]
          }
        },
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "app:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "app:serve:production"
            },
            "ci": {
              "devServerTarget": "app:serve:ci"
            }
          }
        },
        "ionic-cordova-build": {
          "builder": "@ionic/angular-toolkit:cordova-build",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "ionic-cordova-serve": {
          "builder": "@ionic/angular-toolkit:cordova-serve",
          "options": {
            "cordovaBuildTarget": "app:ionic-cordova-build",
            "devServerTarget": "app:serve"
          },
          "configurations": {
            "production": {
              "cordovaBuildTarget": "app:ionic-cordova-build:production",
              "devServerTarget": "app:serve:production"
            }
          }
        }
      }
    }
  },
  "cli": {
    "defaultCollection": "@ionic/angular-toolkit"
  },
  "schematics": {
    "@ionic/angular-toolkit:component": {
      "styleext": "scss"
    },
    "@ionic/angular-toolkit:page": {
      "styleext": "scss"
    }
  }
}
</pre></div>



<p>Let&#8217;s make <code>certificates</code> folder inside <code>src</code> folder and copy your .cer file inside it. please check the screenshot below for the folder structure.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="485" height="1024" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.04.06-485x1024.png" alt="" class="wp-image-2157" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.04.06-485x1024.png 485w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.04.06-142x300.png 142w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.04.06.png 648w" sizes="auto, (max-width: 485px) 100vw, 485px" /></figure>



<p>Now open the terminal and run <code>ionic cordova platform add android</code> to add an android platform. It will generate all related files and folders for android. Open the file <code>config.xml</code> and add below code inside the platform block.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="xml" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">&lt;platform name="android">
     &lt;!-- other tags will be here  -->
    &lt;resource-file src="src/certificates/certificate.cer" target="src/certificates/certificate.cer" />
&lt;/platform></pre></div>



<p>Next, we need to include the Cordova plugin for SSL Pinning, for that we will use <a rel="noreferrer noopener" href="https://github.com/silkimen/cordova-plugin-advanced-http" target="_blank">https://github.com/silkimen/cordova-plugin-advanced-http</a> plugin which is great.  Run below commands in the terminal to install the plugin in the project and we will also need ionic native too.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20" class="dashicon dashicons-admin-page"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">ionic cordova plugin add cordova-plugin-advanced-http

npm install @ionic-native/http
</pre></div>



<p>Once done open <code>app.component.ts</code> file and add code inside <code>initializeApp()</code> function check below file </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="typescript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">import { Component } from '@angular/core';

import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';

 
import { HTTP } from '@ionic-native/http/ngx'; //&lt;=== Import this 

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html',
  styleUrls: ['app.component.scss']
})
export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private httpSSL: HTTP //&lt;=== define this too
  ) {
    this.initializeApp();
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();

      this.platform.ready() 
      .then(() => {
          
          
        this.httpSSL.setServerTrustMode("pinned") //&lt;=== Add this function 
          .then(() => {
              console.log("Congratulaions, you have set up SSL Pinning.")
          })
          .catch(() => {
              console.error("Opss, SSL pinning failed.")
          });
          
          
      })

    });
  }
}
</pre></div>



<p>Now create new service folder to keep all our http service at one place something like below and create <code>api.service.ts</code> file </p>



<figure class="wp-block-image size-medium"><img loading="lazy" decoding="async" width="300" height="138" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.29.54-300x138.png" alt="" class="wp-image-2160" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.29.54-300x138.png 300w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-26-at-23.29.54.png 578w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure>



<p><code>api.service.ts</code></p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="typescript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">import { Injectable } from '@angular/core';
import { HTTP } from '@ionic-native/http/ngx';

@Injectable({
  providedIn: 'root'
})
export class ApiService {
    
    readonly  apiEndPoint = 'https://otricks.com/api/user';
    readonly  fakeEndPoint = 'http://www.google.com/api/xyz'
    
    // This will get work with SSL Pinning becuase API endpoint is same as our certificate 
    getDataFromActualAPi(){
        return this.http.get(`apiEndPoint`,{}, {});
    }
    
    
    // This call will be fail as the domain is not correct according to our certificate.
    getDataFromFakeApi(){
        return this.http.get(`fakeEndPoint`,{}, {});
    }

}</pre></div>



<p></p>



<p>When you call this API service in the component <code>getDataFromActualAPi()</code> will return your correct response, however, if you try to call <code>getDataFromFakeApi()</code> the function will fail as the provided certificate is not from this domain.</p>



<p>The system will throw below error message, you can check in the debugger console.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="javascript" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">{status: -2, error: "TLS connection could not be established: javax.net…n: Trust anchor for certification path not found."}
error: "TLS connection could not be established: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found."
status: -2
}</pre></div>



<p>Hope this will help someone 🙂  if you like this article you may want to check how to <a href="https://otricks.com/how-to-secure-your-ubuntu-server-from-brute-force-attacks/">protect your server </a></p>





<p></p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-implement-ssl-pinning-in-ionic-5-or-html5-app/">How to implement SSL Pinning in Ionic 5?</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ideal setup for working with nodejs typescript in VS code?</title>
		<link>https://otricks.com/what-is-the-ideal-setup-for-working-with-nodejs-typescript-in-vs-code/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Fri, 20 Mar 2020 19:30:46 +0000</pubDate>
				<category><![CDATA[Nodejs]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2105</guid>

					<description><![CDATA[<p>I was a very big fan of nodemon for a long time. for those who don&#8217;t have any idea about nodemon, it&#8217;s file watcher that&#8217;s&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/what-is-the-ideal-setup-for-working-with-nodejs-typescript-in-vs-code/">Ideal setup for working with nodejs typescript in VS code?</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I was a very big fan of <a href="https://www.npmjs.com/package/nodemon">nodemon</a> for a long time. for those who don&#8217;t have any idea about nodemon, it&#8217;s file watcher that&#8217;s looking for any change in any file and refreshes the project to see those changes. In nodejs ecosystem, its uses for debugging purpose which was very helpful. however on the other side its eat up all the system resource. </p>



<p>Now I have switched from nodemon to new amazing <a href="https://www.npmjs.com/package/ts-node-dev">ts-node-dev</a> as stated in npm site</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>It restarts target node process when any of required files changes (as standard <code>node-dev</code>) but shares <a href="https://github.com/Microsoft/TypeScript/">Typescript</a> compilation process between restarts. This significantly increases speed of restarting comparing to <code>node-dev -r ts-node/register ...</code>, <code>nodemon -x ts-node ...</code> variations because there is no need to instantiate <code>ts-node</code> compilation each time.</p></blockquote>



<p>I will show my vs code setup for typescript which auto recompile and uses ts-node-dev package for any file change event.</p>



<h2 class="wp-block-heading">Setup vs code for typescript </h2>



<p>Create a new project in your computer</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">mkdir dummyProject
cd dummyProject</pre></div>



<p>I will be using npm as my package manager, let&#8217;s create a new package with default settings with below command </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">npm init -y</pre></div>



<p>It will generate a new file as a package.json </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">{
  "name": "dummyProject",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}</pre></div>



<p>Add typescript,  ts-node-dev and create new src folder with index.ts file inside.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">npm install typescript ts-node-dev --save-dev
</pre></div>



<p>Open package.json file and add below script inside the scripts block.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">"dev": "ts-node-dev --respawn --transpileOnly src/index.ts"
"dev:debug": "ts-node-dev --inspect=4321 --respawn --transpileOnly src/index.ts"</pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">{
  "name": "dummyProject",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "ts-node-dev --respawn --transpileOnly src/index.ts",
    "dev:debug": "ts-node-dev --inspect=4321 --respawn --transpileOnly src/index.ts"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
</pre></div>



<h2 class="wp-block-heading">Visual studio code debugging</h2>



<p>Inside visual studio code, we can add a breakpoint in the typescript code which can stop at certain points. Inside your root directory of the current project.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">mkdir .vscode
cd .vscode
touch launch.json</pre></div>



<p>Paste the following into your <code>launch.json</code> which we have created the previous step.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="json" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="false">{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to dev:debug",
      "protocol": "inspector",
      "port": 4321,
      "restart": true,
      "cwd": "${workspaceRoot}"
    }
  ]
}</pre></div>



<p>Now do <code>npm run dev:debug</code> first in vs code terminal. once its&#8217; started then click on the debug button from the left  menu in VS code. it will open debugger panel something below.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="615" src="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-1024x615.png" alt="sample vs code with debugger step" class="wp-image-2117" srcset="https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-1024x615.png 1024w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-300x180.png 300w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-768x461.png 768w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-1536x923.png 1536w, https://otricks.com/wp-content/uploads/2020/03/Screen-Shot-2020-03-20-at-23.22.05-2048x1231.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Check out other tips such as <a href="https://otricks.com/how-to-secure-your-ubuntu-server-from-brute-force-attacks/">How to secure ubuntu server</a> </p>
<p>The post <a rel="nofollow" href="https://otricks.com/what-is-the-ideal-setup-for-working-with-nodejs-typescript-in-vs-code/">Ideal setup for working with nodejs typescript in VS code?</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Hackathon 3.0 in Dubai UAE 2020</title>
		<link>https://otricks.com/hackathon-3-0-in-dubai-uae-2020/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Fri, 20 Mar 2020 06:26:55 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2090</guid>

					<description><![CDATA[<p>Last month across the UAE hackathon was conducted by the Telecommunications Regulatory Authority (TRA). it was an initiative to push digital transformation at the federal&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/hackathon-3-0-in-dubai-uae-2020/">Hackathon 3.0 in Dubai UAE 2020</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Last month across the UAE hackathon was conducted by the Telecommunications Regulatory Authority (TRA). it was an initiative to push digital transformation at the federal level.</p>



<p>Hackathon theme was based on:</p>



<ul class="wp-block-list"><li>Happiness &amp; Wellbeing</li><li>Expo 2020</li><li>Smart Sustainable Cities</li><li>Environment &amp; Climate Change</li><li>World-Class Healthcare</li><li>Invest in Space</li><li>Sustainability &amp; Integrated Infrastructure</li><li>World-Class Education</li><li>Digital Transformation</li><li>Security &amp; Safety</li></ul>



<p>We decided to participate in hackathon3.0 in Dubai UAE which was on 24 &#8211; 26 February 2020. We form a quick team within our office and register. we named our team as iHifz (which means conserve in Arabic).</p>



<p>After initial brainstorm sessions, we pick two main ideas that revolve around wellbeing and smart sustainable cities. Hackathon.ae provides very good information regarding data points aka APIs.</p>



<p>I Had participated in other hackathons in the past, which was conducted by IATA and other big names in the tech industry, I am very impressed by the hackthon.ae team who manage such a big event with ease. </p>



<p>For Dubai, they have selected Zayad University, as the venue was near to our office building it was a bit convenient for the guys to travel. </p>



<p>For opening keynote, we were little bord as all the speakers were talking in Arabic. however, after lunch when other teams were pitching their ideas we were blown away, so many college teams had great ideas and were showing their concept to the jury.</p>



<p>We had great fun building our prototype and showing it to the final selection committee. </p>



<p></p>
<p>The post <a rel="nofollow" href="https://otricks.com/hackathon-3-0-in-dubai-uae-2020/">Hackathon 3.0 in Dubai UAE 2020</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Best &#038; free google chrome plugin with HD wallpaper, world time, quotes with many more..</title>
		<link>https://otricks.com/replace-your-boring-chrome-tab-screen-with-an-amazing-tab-it-has-lots-of-features-functionality-install-it-get-amazed/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Sat, 14 Mar 2020 14:18:43 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[plugin]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2075</guid>

					<description><![CDATA[<p>When we start a new page/ new tab, we want something amazing from the chrome tab. A great HD wallpaper with clocks/ Timers world time&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/replace-your-boring-chrome-tab-screen-with-an-amazing-tab-it-has-lots-of-features-functionality-install-it-get-amazed/">Best &#038; free google chrome plugin with HD wallpaper, world time, quotes with many more..</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When we start a new page/ new tab, we want something amazing from the chrome tab. A great HD wallpaper with clocks/ Timers world time with different timezones, custom images with dynamically generated patterns.</p>



<p>We have covered all the great features including, world&#8217;s best photo from great photographers, best quotes to get motivated and inspire every day, add new abstract patterns to show your creativity and imagination, view the current time and set world clock with a different timezone that could be useful if you are working on multiple locations and want to see a quick time.</p>



<p>New Amazing Tab will be free forever for people like you and me</p>



<p>Features list</p>



<ul class="wp-block-list"><li>Get amazed with a fresh image every day from world-class photographers.</li><li>Create wallpaper patterns, to show your creative side. save created pattern into a photo album.</li><li>Change wallpaper image or set your own image as a wallpaper image.</li><li>Set Image change on every new tab open or every hour.</li><li>Search images from millions of images and set as wallpaper.</li><li>Get images from already crafted categories to suit your choice.</li><li>Set multiple clocks to have different timezones time with your custom names.</li><li>Set master clock with different styles, such as Rotary clock, Classical clock, Digital clock, and 3D clock.</li><li>Get motivated every day with the best quotes, you can change or add to favorite your quote.</li><li>Set Salat times (Muslim prayer) based on your current location or set the different locations of your choice.</li></ul>



<p>Please download it from the chrome store and provide your feedback.</p>



<pre class="wp-block-preformatted"><a href="https://chrome.google.com/webstore/detail/new-amazing-tab/ekbpbniminfcdefejlmipbdcnoblhamb?h1=en" class="rank-math-link">https://chrome.google.com/webstore/detail/new-amazing-tab/ekbpbniminfcdefejlmipbdcnoblhamb?h1=en</a></pre>



<figure class="wp-block-gallery aligncenter columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="640" height="400" src="https://otricks.com/wp-content/uploads/2020/03/tab-5.jpg" alt="" data-id="2079" data-full-url="https://otricks.com/wp-content/uploads/2020/03/tab-5.jpg" data-link="https://otricks.com/?attachment_id=2079" class="wp-image-2079" srcset="https://otricks.com/wp-content/uploads/2020/03/tab-5.jpg 640w, https://otricks.com/wp-content/uploads/2020/03/tab-5-300x188.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="640" height="400" src="https://otricks.com/wp-content/uploads/2020/03/tab-2.jpg" alt="" data-id="2082" data-full-url="https://otricks.com/wp-content/uploads/2020/03/tab-2.jpg" data-link="https://otricks.com/?attachment_id=2082" class="wp-image-2082" srcset="https://otricks.com/wp-content/uploads/2020/03/tab-2.jpg 640w, https://otricks.com/wp-content/uploads/2020/03/tab-2-300x188.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="640" height="400" src="https://otricks.com/wp-content/uploads/2020/03/tab-3.jpg" alt="" data-id="2081" data-full-url="https://otricks.com/wp-content/uploads/2020/03/tab-3.jpg" data-link="https://otricks.com/?attachment_id=2081" class="wp-image-2081" srcset="https://otricks.com/wp-content/uploads/2020/03/tab-3.jpg 640w, https://otricks.com/wp-content/uploads/2020/03/tab-3-300x188.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="640" height="400" src="https://otricks.com/wp-content/uploads/2020/03/tab-1.jpg" alt="" data-id="2078" data-full-url="https://otricks.com/wp-content/uploads/2020/03/tab-1.jpg" data-link="https://otricks.com/?attachment_id=2078" class="wp-image-2078" srcset="https://otricks.com/wp-content/uploads/2020/03/tab-1.jpg 640w, https://otricks.com/wp-content/uploads/2020/03/tab-1-300x188.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="640" height="400" src="https://otricks.com/wp-content/uploads/2020/03/tab-4.jpg" alt="" data-id="2080" data-full-url="https://otricks.com/wp-content/uploads/2020/03/tab-4.jpg" data-link="https://otricks.com/?attachment_id=2080" class="wp-image-2080" srcset="https://otricks.com/wp-content/uploads/2020/03/tab-4.jpg 640w, https://otricks.com/wp-content/uploads/2020/03/tab-4-300x188.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure></li></ul></figure>
<p>The post <a rel="nofollow" href="https://otricks.com/replace-your-boring-chrome-tab-screen-with-an-amazing-tab-it-has-lots-of-features-functionality-install-it-get-amazed/">Best &#038; free google chrome plugin with HD wallpaper, world time, quotes with many more..</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to secure your Ubuntu server from brute-force attacks?.</title>
		<link>https://otricks.com/how-to-secure-your-ubuntu-server-from-brute-force-attacks/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Tue, 10 Mar 2020 11:52:55 +0000</pubDate>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2057</guid>

					<description><![CDATA[<p>Nowadays more and more people and organizations are going on the cloud for their applications, and its very common practice to have a server on&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-secure-your-ubuntu-server-from-brute-force-attacks/">How to secure your Ubuntu server from brute-force attacks?.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Nowadays more and more people and organizations are going on the cloud for their applications, and its very common practice to have a server on the cloud. As more people are using cloud solutions so do more attackers are after them.</p>



<p>According to Ubuntu data, there are around at least 20 million users are using Ubuntu and that&#8217;s a very big number. It would be a gold mine for attackers who keep trying to get access to your server using a brute-force attack, for those who don&#8217;t know what the hack is brute-force attack?. its an attempt to crack username and password, using trial and error approach with the hope to get it correct for multiple time, if you keep your password or username very generic or easy to guess they might get into your system.</p>



<p>It&#8217;s a very old attack method, however, it&#8217;s still very effective and popular within the hacker community.    You can read more about brute-force attack here.<a rel="noreferrer noopener" target="_blank" href="https://en.wikipedia.org/wiki/Brute-force_attack">https://en.wikipedia.org/wiki/Brute-force_attack</a></p>



<p>It&#8217;s always a better idea to secure your system/service/server from such wicked people. Let&#8217;s get it done.</p>



<p>I will be using my  Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-88-generic x86_64) machine.</p>



<p>Update your system first running below commands in the terminal, my assumption is you are already logged in with Root access using SSH.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">apt-get update
apt-get upgrade</pre></div>



<p>After a system update add Fail2ban, which is an invasion blocking software framework that protects servers from brute-force attacks, it&#8217;s written in the Python.</p>



<p>Fail2Ban scans log files like /var/log/auth.log and bans IP addresses conducting too many failed login attempts. It does this by updating system firewall rules to reject new connections from those IP addresses, for a configurable amount of time. </p>



<p>Fail2Ban comes out-of-the-box ready to read many standard log files, such as those for sshd and Apache, and is easily configured to read any log file of your choosing, for any error you wish.</p>



<p>Though Fail2Ban is able to reduce the rate of incorrect authentication attempts, it cannot eliminate the risk presented by weak authentication. Set up services to use only two factor, or public/private authentication mechanisms if you really want to protect services.</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">
apt-get install fail2ban</pre></div>



<p>Copy the configuration file and do changes </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local</pre></div>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">
sudo nano /etc/fail2ban/jail.local</pre></div>



<p></p>



<p>Change the ban time from 600 (10 minutes) to 604800 (7 days) is guess this would be more than enough to have peaceful nights 🙂</p>



<p>Nest step is to install logwatch is the tool the aggregate all system logs and make meaningful decisions. </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">
apt-get install logwatch</pre></div>



<p>Logwatch can be configurated to trigger a daily email of your logs.</p>



<p></p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">nano /etc/cron.daily/00logwatch</pre></div>



<p>Add below line at the bottom of the cron job file and replace the example email with your own address. </p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="sh" data-theme="monokai" data-fontsize="14" data-lines="Infinity" data-showlines="true" data-copy="true">/usr/sbin/logwatch --output mail --mailto mail@example.com --detail high</pre></div>
<p>The post <a rel="nofollow" href="https://otricks.com/how-to-secure-your-ubuntu-server-from-brute-force-attacks/">How to secure your Ubuntu server from brute-force attacks?.</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Manage Multiple version of Node in a single machine</title>
		<link>https://otricks.com/manage-multiple-version-of-node-in-a-single-machine/</link>
		
		<dc:creator><![CDATA[Anjum Nawab]]></dc:creator>
		<pubDate>Fri, 06 Mar 2020 13:32:07 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Nodejs]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">https://otricks.com/?p=2049</guid>

					<description><![CDATA[<p>When we start using node.js as our primary framework for writing multiple applications, Over the time it will be really pain in the neck, to&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://otricks.com/manage-multiple-version-of-node-in-a-single-machine/">Manage Multiple version of Node in a single machine</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When we start using node.js as our primary framework for writing multiple applications, Over the time it will be really pain in the neck, to manage older projects or projects with different node versions. </p>



<p>While working on angularjs to angualr 9 or ionic to ionic 5, I have a variety of node versions in different projects. Node community has also faced similar problems, to rescue there is a package to manage different versions of the node in a single computer, without uninstalling or re-installing your required version.</p>



<p>  You can install <a href="https://github.com/nvm-sh/nvm" class="rank-math-link">https://github.com/nvm-sh/nvm</a> in your computer to manage node</p>



<p>Once install its very easy to change your desire node version. To download, compile, and install the latest release of the node, do this:</p>



<div style="height: 250px; position:relative; margin-bottom: 50px;" class="wp-block-simple-code-block-ace"><div style="position:absolute;top:-20px;right:0px;cursor:pointer" class="copy-simple-code-block"><svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-admin-page" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20"><path d="M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z"></path></svg></div><pre class="wp-block-simple-code-block-ace" style="position:absolute;top:0;right:0;bottom:0;left:0" data-mode="javascript" data-theme="monokai" data-fontsize="12" data-lines="Infinity" data-showlines="true" data-copy="true">nvm install node # "node" is an alias for the latest version</pre></div>
<p>The post <a rel="nofollow" href="https://otricks.com/manage-multiple-version-of-node-in-a-single-machine/">Manage Multiple version of Node in a single machine</a> appeared first on <a rel="nofollow" href="https://otricks.com">Otricks.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
