Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
EntropyWorks / add-ssh-keys.yml
Last active March 29, 2022 21:04
Add all the hosts from your ansible inventory to your .ssh/known_hosts and also use ssh-copy-id to add keys to the hosts
---
# Original idea found at http://stackoverflow.com/a/39083724
#
# ansible -i inventory.ini add-ssh-keys.yml
#
- name: Store known hosts of 'all' the hosts in the inventory file
hosts: localhost
connection: local
vars:
ssh_known_hosts_command: "ssh-keyscan -T 10"
@lyyourc
lyyourc / RxJS 5 Operators By Example.md
Last active June 3, 2017 12:57
「译」RxJS 5 Operators By Example

Emacs Lesson 1

Keybindings Cheatsheet

Getting out
C-x C-cExit emacssave-buffers-kill-terminal
C-gCancel running or partially typed commandkeyboard-quit

C#编码规范

概述

规范制定原则

  • 方便代码的交流和维护。
  • 不影响编码的效率,不与大众习惯冲突。
  • 使代码更美观、阅读更方便。
  • 使代码的逻辑更清晰、更易于理解。

package.el

Before Emacs 24 the only way to benefit from third party elisp packages was to copy them to your configuration. RMS always opposed a package manager in Emacs because it would make it too easy to install non-free additions (this might not be a 100% accurate represetation of what happened, it’s what I remember hearing/reading).

In any case, Emacs 24 shipped with package.el, so now there’s a package manager. You can do M-x list-packages and it will fetch a list of packages from one or more package repositories. You find the package you want, type i, then x and it installs.

repositories

There are a few different repositories. The “official” one from GNU is called ELPA. The most popular one with lots more than ELPA is MELPA. Here is how you add MELPA to your config: