Skip to content

Instantly share code, notes, and snippets.

View zainuleb's full-sized avatar
🤍

Zain Ul Ebad zainuleb

🤍
View GitHub Profile
@zainuleb
zainuleb / GKE Hello app deployment
Created June 8, 2023 19:38
Kubernetes deployment for GKE Hello app.
apiVersion: apps/v1
kind: Deployment
metadata:
name: helloweb
labels:
app: hello
spec:
selector:
matchLabels:
app: hello
@zainuleb
zainuleb / Stripe MCC List
Created April 27, 2023 10:46
In the context of Stripe, it could refer to the "Stripe MCC List," which is a list of merchant category codes (MCCs) that Stripe uses to classify businesses based on the type of goods or services they offer. MCCs are four-digit codes that are assigned to businesses by credit card companies to help categorize them for transaction processing purpo…
const services = [
{ serviceName: "A/C, Refrigeration Repair", mccNumber: "7623" },
{ serviceName: "Accounting/Bookkeeping Services", mccNumber: "8931" },
{ serviceName: "Advertising Services", mccNumber: "7311" },
{ serviceName: "Agricultural Cooperative", mccNumber: "0763" },
{ serviceName: "Airlines, Air Carriers", mccNumber: "4511" },
{ serviceName: "Airports, Flying Fields", mccNumber: "4582" },
{ serviceName: "Ambulance Services", mccNumber: "4119" },
{ serviceName: "Amusement Parks/Carnivals", mccNumber: "7996" },
{ serviceName: "Antique Reproductions", mccNumber: "5937" },
@zainuleb
zainuleb / CognitoUserPoolSignUp.js
Created February 13, 2023 00:32
creates a new instance of the CognitoUserPool class with the UserPoolId and ClientId, and then calls the signUp method to sign up a user with their email, password, and additional attributes such as name, preferred username, and gender. The sign-up process is completed with a callback function that logs the sign-up data to the console or outputs…
UserPool.signUp(
email,
password,
[
{ Name: 'name', Value: name },
{ Name: 'preferred_username', Value: username },
{ Name: 'gender', Value: gender },
],
null,
(err, data) => {
@zainuleb
zainuleb / InitializeCognitoUserPool.js
Created February 13, 2023 00:27
This code creates a new instance of the CognitoUserPool class from the amazon-cognito-identity-js library, with the specified UserPoolId and ClientId. The poolData object contains these two pieces of information which are used to initialize the user pool. The user pool is the central entity in Amazon Cognito and holds the user records for your a…
const poolData = {
UserPoolId: 'Your User Pool ID',
ClientId: 'Your Client ID',
};
const UserPool = new CognitoUserPool(poolData);
@zainuleb
zainuleb / CDK-S3
Created January 21, 2023 21:55
This script imports the AWS Cloud Development Kit (CDK) library and the S3 module from the CDK library. It then exports a new class called "AwsCdkTsStack" which extends the "Stack" class from the CDK library. The class has a constructor that creates a new instance of an S3 bucket and assigns it to a variable called "s3Bucket". The S3 bucket is g…
import * as cdk from 'aws-cdk-lib';
import * as _s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
export class AwsCdkTsStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const s3Bucket = new _s3.Bucket(this, 'samplebucket-123-xxxx', {
bucketName: 'samplename',
<hr />
<input [value]="name" />
<hr />
<div>
<img [src]="image" [alt]="name" />
</div>
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
public name = 'Mecall';
public image =
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
currentUser = 'Asim';
@zainuleb
zainuleb / app.component.html
Created November 24, 2021 19:30
Calling functions using string interpolation
<h2>{{ userComment() }}</h2>
@zainuleb
zainuleb / app.component.html
Created November 24, 2021 19:24
You can use String Functions within interpolation brackets
<h2>Lenth: {{ currentUser.length }}</h2>
<h2>Lenth: {{ currentUser.toUpperCase() }}</h2>