Skip to content

Instantly share code, notes, and snippets.

View Souvikns's full-sized avatar
🎯
Focusing

souvik Souvikns

🎯
Focusing
View GitHub Profile
@Souvikns
Souvikns / CountingSort.java
Created December 16, 2018 15:17 — forked from anubhavshrimal/CountingSort.java
performs sorting of an integer array using counting sort algorithm in O(n) time complexity
import java.util.Scanner;
public class CountingSort
{
//method to get the maximum element from the array
private int getMax(int a[],int size)
{
int max=a[0];
for (int i = 1; i < size; i++)
{
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
@Souvikns
Souvikns / index.js
Created March 29, 2021 22:00
AsyncApiDiff_v2
/**
*
* Having two asynapi doc we will be trying to find changes with respect to the first
* basically we will be checking how much of the first document has changed
*
* We can try to change categorise the changes as
* - additions
* - deletions
* - changes
*
@Souvikns
Souvikns / index.js
Created March 28, 2021 12:23
asyncApiDiff
const parser = require('@asyncapi/parser');
const fs = require('fs');
const path = require('path');
const main = async () => {
const diff = {
additions: [],
deletions: [],
changes: {},
generate: doc => {
import "./styles.css";
import { usePokemon } from "./hook";
export default function App() {
let pokemons = usePokemon();
return (
<div>
<h1>Hello CodeSandbox</h1>
<h2>Start editing to see some magic happen!</h2>
<table>
<tr>
import {main, options} from '@asyncapi/diff/cli';
import Command from '../base';
import {flags} from '@oclif/command';
export default class Diff extends Command {
static flags = options.getFlags(flags);
static args = options.args;
@Souvikns
Souvikns / bundle.ts
Last active February 12, 2022 12:11
This is how the bundle command would look...
import {main, options} from '@asyncapi/bundler/cli';
import bundle from '@asyncapi/bundler';
import Command from './base';
import {Flags} from '@oclif/core';
export default class Bundle extends Command {
static strict = false;
static flags = options.getFlags(Flags);
async run(){
@Souvikns
Souvikns / integration.js
Created March 10, 2022 07:25
POC for JSON schema integration of AsyncAPI internal tools
// bundler integration function
const bundle = require('@asyncapi/bundler');
async function bundler(inputs,options, output) {
const files = inputs.files;
const base = options.base;
const format = output.format;
const document = await bundle(files, {
base: base
@Souvikns
Souvikns / log.txt
Created January 11, 2023 12:53
Error Log from running tests in asyncapi cli
➜ npm run test
> @asyncapi/cli@0.27.2 pretest
> npm run build
> @asyncapi/cli@0.27.2 build
> rimraf lib && node scripts/fetch-asyncapi-example.js && tsc && echo "Build Completed"
Fetched ZIP file
export default async function () {
return {
authentication: (servername: string, channelname: string, parsedAsyncAPISpec: AsyncAPI) {
if (servername === 'ws-client') {
return {token: process.env.TOKEN}
}
}
}
}