All prefixed by local leader, which is \ in my case.
:disconnect "cd"
:connect-port-file "cf"
:interrupt "ei"
:last-exception "ex"
:view-source "es"| (module dotfiles.module.core | |
| {require {core aniseed.core | |
| util dotfiles.util | |
| nvim aniseed.nvim}}) | |
| (set nvim.o.syntax "true") | |
| (set nvim.o.splitbelow true) | |
| (set nvim.o.termguicolors true) | |
| (set nvim.o.foldmethod "syntax") | |
| (set nvim.o.foldlevelstart 99) |
| exports.handler = (event, context, callback) => { | |
| const response = { | |
| statusCode: 301, | |
| headers: { | |
| Location: 'https://google.com', | |
| } | |
| }; | |
| return callback(null, response); | |
| } |
| import grpc | |
| import helloworld_pb2 | |
| import helloworld_pb2_grpc | |
| # you need to use secure port, | |
| # otherwise call credentials won't be transmitted | |
| def run(): | |
| with open('server.crt', 'rb') as f: | |
| trusted_certs = f.read() |
| defmodule HelloServer do | |
| use GenServer | |
| ## Server API | |
| def init(initial_value) do # initiating the state with the value 1 passed | |
| {:ok,initial_value} | |
| end | |
| # add the value to the state and returns :ok | |
| def handle_call({:add,value},_from,state) do |
| GATEWAY_FLAGS := -I. -I/usr/local/include -I$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/usr/local/include | |
| GRPC_FLAGS := --python_out=. --grpc_python_out=. | |
| code: | |
| python -m grpc_tools.protoc $(GRPC_FLAGS) $(GATEWAY_FLAGS) *.proto | |
| gw: | |
| protoc $(GATEWAY_FLAGS) \ | |
| --go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \ |
| """Base class for implementing Lambda handlers as classes. | |
| Used across multiple Lambda functions (included in each zip file). | |
| Add additional features here common to all your Lambdas, like logging.""" | |
| class LambdaBase(object): | |
| @classmethod | |
| def get_handler(cls, *args, **kwargs): | |
| def handler(event, context): | |
| return cls(*args, **kwargs).handle(event, context) | |
| return handler |
These are for the combined vim-sexp (https://github.com/guns/vim-sexp) and vim-sexp-mappings-for-regular-people (https://github.com/tpope/vim-sexp-mappings-for-regular-people) plugins. vim-sexp is neat on its own but Tim Pope makes common stuff much easier.
Note that some vim-sexp functionality depends on <LocalLeader> mappings. This is a different leader key than the global leader, and is the variable maplocalleader (instead of mapleader). To see if you have this set, use :echo maplocalleader; if it errors out you'll need to set it, otherwise it will echo the key. If you want to set your LocalLeader to <Space>, you'll need two commands in your .vimrc, since by default <Space> is bound to <Right> in normal mode:
nnoremap <Space> <Nop>
let maplocalleader=" "
| import re | |
| import uuid | |
| import base64 | |
| def uuid_url64(): | |
| """Returns a unique, 16 byte, URL safe ID by combining UUID and Base64 | |
| """ | |
| rv = base64.b64encode(uuid.uuid4().bytes).decode('utf-8') | |
| return re.sub(r'[\=\+\/]', lambda m: {'+': '-', '/': '_', '=': ''}[m.group(0)], rv) |