Skip to content

Instantly share code, notes, and snippets.

View techyaura's full-sized avatar
🧿
Focusing

Abhay techyaura

🧿
Focusing
View GitHub Profile
@techyaura
techyaura / javascript-set.js
Last active August 23, 2019 11:53
Javascript Sets & their implementation
/** Syntax for creating Set*/
const set = new Set();
/** Syntax for adding element to Set*/
set.add(4); // {4}
set.add(5); // {4,5}
set.add(4); // {4, 5}
/** Syntax for deleting element to Set*/
set.delete(4); // {5}
@mhowlett
mhowlett / docker-compose.yml
Last active March 16, 2024 18:50
Brings up a kafka cluster using Docker for Mac. Usage: MY_IP=<your ip> docker-compose up
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:3.0.1
ports:
- "22181:22181"
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181
@eholk
eholk / morse.js
Last active November 8, 2020 20:46
A Morse Code generator in Java Script
// Copyright 2014–2017, Eric Holk
//
// Licensed 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
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,