Let's generate User model and controller.
mix ecto.create # create DB table
mix phx.gen.json Accounts User users email:string password_hash:string # scaffold users structure
" Plugin setup | |
call plug#begin() | |
" Utils | |
Plug 'seerun/vim-polyglot' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'ap/vim-css-color' | |
Plug 'preservim/nerdtree' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'karb94/neoscroll.nvim' | |
Plug 'tpope/vim-surround' |
class TaskRunner { | |
constructor(concurrencyLimit) { | |
this.count = 0; | |
this.queue = []; | |
this.concurrent = concurrencyLimit; | |
} | |
add(task) { | |
const microTask = async () => { | |
await task(); |
type ClientParams = { boardID: number; collaboratorID: string }; | |
/** | |
* POC of generating short CharIDs per board client. (See the reasoning here: https://miro.atlassian.net/wiki/spaces/PT/pages/3180396935/RFC+Collaborative+Editing+on+Ordered+Sequences#Ways-to-tackle-these-issues%3A) | |
* | |
* This algorithm respects the _reserved values_ of the total order generator algorithm on the client. | |
* | |
* - Everytime a client connects to the board we generate a ASCII char ID. | |
* - Everytime a client disconnects from the board, we put their char ID in the `free slots` for recycling. | |
* |
const val LAST_INTERNAL = "~" | |
class PositionGenerator(private val ID: String) { | |
companion object { | |
const val FIRST: String = "" | |
const val LAST: String = LAST_INTERNAL | |
} | |
private val longName: String = ",$ID." | |
private val firstName: String = "$ID." |