Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chetanyachopra's full-sized avatar
👨‍💻
exploring

Chetanya Chopra chetanyachopra

👨‍💻
exploring
View GitHub Profile
@chetanyachopra
chetanyachopra / DevKafkaClusterSetup.yml
Created March 30, 2021 12:14
Docker Configuration for setting up kafka Cluster for Development in local machine or in sandbox environment
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.4.0
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@chetanyachopra
chetanyachopra / 1_Storage.sol
Created December 21, 2020 17:32
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.2+commit.bacdbe57.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
@chetanyachopra
chetanyachopra / lottery.sol
Last active September 8, 2020 06:06
A distributted and open lottery Smart Contract on ethereum which ensures total transparency in Lottery Systems which ensures trust in this Lottery Scheme
pragma solidity ^0.4.17;
contract Lottery {
address public manager;
address[] public players;
function Lottery() public {
manager = msg.sender;
}
@chetanyachopra
chetanyachopra / FindFunctionDef.cpp
Last active February 20, 2018 18:16
FindfunctionDef finds the defination of function and returns the line number
/*
FindFunctionDef finds function defination in a source code and returns its line number
*/
#include <iostream>
#include <string.h>
using namespace std;
unsigned int FindFunctionDefn(char* strFunctionName, char* strSourceCode ) {
//getting position of function defination
@chetanyachopra
chetanyachopra / 3DVector.cpp
Last active February 20, 2018 18:13
Vector3D class contains basic functionality like adding, subtracting, dot product, cross product
/*
Coded by Chetanya Chopra
github : http://github.com/chetanyachopra
*/
/*A basic 3d vector Class */
#include<iostream>