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) |
class Node { | |
constructor(val) { | |
this.prev = null | |
this.val = val | |
this.next = null | |
} | |
} | |
class LinkedList { | |
constructor() { |
Date.now().toString(36) + Math.random().toString(36).substring(2,10) |
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 = [] |
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
How to Add rsync to Git Bash for Windows 10
Download the package: http://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/rsync-3.1.2-2-x86_64.pkg.tar.xz
Extract it and move rsync.exe
to %HOMEDRIVE%%HOMEPATH%\AppData\Local\Programs\Git\usr\bin
.
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
Docker Commands, Help & Tips
Show commands & management commands
$ docker
Docker version info
MongoDB Cheat Sheet
Show All Databases
show dbs