Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Prashant Singh prashant1k99

🏠
Working from home
View GitHub Profile
@prashant1k99
prashant1k99 / stack.js
Created Dec 27, 2020
Stack implementation with Array
View stack.js
class Stack {
constructor(val) {
if (!val) {
throw new Error('Please set the max for the stack')
}
this.max = val
this.__data__ = []
}
get __isFull() {
return this.__data__.length == (this.max - 1)
@prashant1k99
prashant1k99 / linkedList.js
Created Dec 27, 2020
LinkedList Implementation in Js
View linkedList.js
class Node {
constructor(val) {
this.prev = null
this.val = val
this.next = null
}
}
class LinkedList {
constructor() {
@prashant1k99
prashant1k99 / generate-uuid.js
Created Dec 26, 2020
To generate UUID in Js without any library
View generate-uuid.js
Date.now().toString(36) + Math.random().toString(36).substring(2,10)
@prashant1k99
prashant1k99 / map-polyfill.js
Last active Dec 26, 2020
Polyfill for the Map in Js
View map-polyfill.js
class BetterMap {
constructor(init) {
this.clear()
if (init)
for (var i = 0; i < init.length; i++)
this.set(init[i][0], init[i][1])
}
clear() {
this._map = {}
this._keys = []
@prashant1k99
prashant1k99 / js_concept.md
Created Dec 9, 2020
📜 33 concepts every JavaScript developer should know.
View js_concept.md


33 Concepts Every JS Developer Should Know

33 Concepts Every JavaScript Developer Should Know

Follow me

View prosemirror-guide.md

ProseMirror for dummies

This repo used to be a simple cookbook but I decided to convert this repo into "ProseMirror for dummies". In part because I wil most likely forget all the info written here, and in part because I'd like to help you, dear reader, in your struggle to use this library which is not for the faint of heart.

This is a work in progress. If you have any suggestion, please do not hesitate to create an issue or a PR.

Also, check the ProseMirror Utils repo by Atlassian. Not only it is useful per se, but the source code offers a lot of information on how to to certain things.

Basics

Triggering changes from the keyboard

@prashant1k99
prashant1k99 / add-rsync-to-git-bash.md
Created Nov 6, 2020 — forked from hisplan/add-rsync-to-git-bash.md
Add rsync to git bash for windows
View add-rsync-to-git-bash.md
@prashant1k99
prashant1k99 / docker_wordpress.md
Created Aug 12, 2020 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin
View docker_wordpress.md

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@prashant1k99
prashant1k99 / docker-help.md
Created Aug 12, 2020 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips
View docker-help.md

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

View mongodb_cheat_sheet.md

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database