This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q- quitSPC w /- split window verticallySPC w- - split window horizontallySPC 1- switch to window 1SPC 2- switch to window 2SPC w c- delete current window
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q - quitSPC w / - split window verticallySPC w - - split window horizontallySPC 1 - switch to window 1SPC 2 - switch to window 2SPC w c - delete current window| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| mkdir \data\rs1 \data\rs2 \data\rs3 | |
| start mongod --replSet m101 --logpath "1.log" --dbpath \data\rs1 --port 27017 --smallfiles --oplogSize 64 | |
| start mongod --replSet m101 --logpath "2.log" --dbpath \data\rs2 --port 27018 --smallfiles --oplogSize 64 | |
| start mongod --replSet m101 --logpath "3.log" --dbpath \data\rs3 --port 27019 --smallfiles --oplogSize 64 |
| var pubsub = {}; | |
| (function(q) { | |
| var topics = {}, subUid = -1; | |
| q.subscribe = function(topic, func) { | |
| if (!topics[topic]) { | |
| topics[topic] = []; | |
| } | |
| var token = (++subUid).toString(); | |
| topics[topic].push({ | |
| token: token, |