| from collections import namedtuple | |
| def convert(dictionary): | |
| return namedtuple('GenericDict', dictionary.keys())(**dictionary) | |
| """ | |
| >>> d = dictionary(a=1, b='b', c=[3]) | |
| >>> named = convert(d) | |
| >>> named.a == d.a | |
| True | |
| >>> named.b == d.b |
| # Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing> | |
| # Open source under MIT LICENSE. | |
| lazy_load() { | |
| # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it. | |
| # E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time | |
| # $1: space separated list of alias to release after the first load | |
| # $2: file to source | |
| # $3: name of the command to run after it's loaded | |
| # $4+: argv to be passed to $3 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
| { | |
| ;; ! | means mandatory | |
| ;; # | means optional | |
| ;; !! | mandatory command + control + optional + shift (hyper) | |
| ;; ## | optional any | |
| ;; to understand better how modifiers work in karabiner | |
| ;; https://pqrs.org/osx/karabiner/json.html#from-event-definition-modifiers | |
| ;; C | left_command |
Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.
This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.
There is a companion feature matrix of various tools. Comments are welcome in the same manner.
| brew install macvim --with-cscope --with-lua --override-system-vim |
| module Where | |
| class <<self | |
| attr_accessor :editor | |
| def is_proc(proc) | |
| source_location(proc) | |
| end | |
| def is_method(klass, method_name) | |
| source_location(klass.method(method_name)) |