This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: autoscaling/v2beta1 | |
| kind: HorizontalPodAutoscaler | |
| metadata: | |
| name: listingsvchpa | |
| spec: | |
| maxReplicas: 10 | |
| minReplicas: 2 | |
| metrics: | |
| - type: Resource | |
| resource: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resources: | |
| requests: | |
| cpu: "50m" | |
| memory: "300Mi" | |
| limits: | |
| cpu: "100m" | |
| memory: "400Mi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: mysecret | |
| type: Opaque | |
| data: | |
| MONGOUSERNAME: YWRtaW4= | |
| MONGOPASSWORD: YWRtaW4= | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Router } from "express"; | |
| import { Request, Response, NextFunction } from "express"; | |
| import { ItemController } from "../listing/lib/controllers/crmController"; | |
| import "reflect-metadata"; | |
| class ListingMongoController { | |
| public itemController: ItemController = new ItemController(); | |
| public router: Router; | |
| constructor() { | |
| this.router = Router(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Router } from "express"; | |
| import { Request, Response, NextFunction } from "express"; | |
| import { ItemController } from "../listing/lib/controllers/crmController"; | |
| import "reflect-metadata"; | |
| class ListingMongoController { | |
| public itemController: ItemController = new ItemController(); | |
| public router: Router; | |
| constructor() { | |
| this.router = Router(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as mongoose from "mongoose"; | |
| import { ItemSchema } from "../models/crmModel"; | |
| import { Request, Response } from "express"; | |
| const Item = mongoose.model("Item", ItemSchema); | |
| export class ItemController { | |
| public addNewItem(req: Request, res: Response) { | |
| res.setHeader('Content-Type', 'application/json'); | |
| let newItem = new Item(req.body); | |
| newItem.save((err, data) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as mongoose from 'mongoose'; | |
| const Schema = mongoose.Schema; | |
| export const ItemSchema = new Schema({ | |
| Name:{ | |
| type: String | |
| }, | |
| Image: { | |
| type: String | |
| }, | |
| Price: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ed25519_python as curve | |
| import random | |
| import hashlib | |
| alicePrivateKey = curve.curve.mul(curve.curve.g,5) | |
| alicePrivateKey = curve.curve.compress(alicePrivateKey).encode('hex') | |
| m = "hello world" | |
| G = curve.curve.g | |
| alicePublicKeyOrignal = curve.curve.mul(G,int(alicePrivateKey,16)) | |
| alicePublicKey = curve.curve.compress(alicePublicKeyOrignal).encode('hex') | |
| r = random.randint(1, 2^50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'digest' | |
| $provePrimeNumber = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 -1 | |
| $numberOfPointsInFeild = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
| $Acurve = 0 | |
| $xcoordinate = 55066263022277343669578718895168534326250603453777594175500187360389116729240 | |
| $ycoordinate = 32670510020758816978083085130507043184471273380659243275938904335757337482424 | |
| $privKey = "A665A45920422F9D417E4867EFDC4FB8A04A1F3FFF1FA07E998E86F7F7A27AE3" | |
| $point = Array.new([$xcoordinate,$ycoordinate]) | |
| def dectobin(var) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'digest' | |
| $provePrimeNumber = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 -1 | |
| $numberOfPointsInFeild = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
| $Acurve = 0 | |
| $xcoordinate = 55066263022277343669578718895168534326250603453777594175500187360389116729240 | |
| $ycoordinate = 32670510020758816978083085130507043184471273380659243275938904335757337482424 | |
| $privKey = "A665A45920422F9D417E4867EFDC4FB8A04A1F3FFF1FA07E998E86F7F7A27AE3" | |
| $point = Array.new([$xcoordinate,$ycoordinate]) | |
| def dectobin(var) |