Headline | Time |
---|---|
Total time | 0:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* root topic - TAB and S-TAB to toggle folding | |
** child topic | |
child topic text | |
*** leaf topic: | |
some text blah | |
blah | |
blah | |
*** another leaf topic: | |
# test table - TAB to cycle through columns, M-e to move point to end of cell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# e.g. portable killall based on a grep expression | |
# usage: killgrep python3 | |
$ echo "killgrep() {ps -aux | grep -i \"\$1\" | awk '{print \$2}' | xargs kill -9;}" >> ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.protobuf.json_format import MessageToDict | |
from google.protobuf.json_format import ParseDict | |
def encode(dictObj, pb_class): | |
"""Takes in a dict and returns the serialized binary of pb_class""" | |
# pb = dict_to_protobuf(pb_class, dict) | |
pb = pb_class() | |
pb = ParseDict(dictObj, pb, ignore_unknown_fields=True) | |
return pb.SerializeToString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Scripted deployment of a pod w/ forward ports using ssh tunnels via $JUMP_BOX. | |
JUMP_BOX=root@my-bastion-host | |
NAME="my-container-prefix-name" | |
CONTAINER=`kubectl -n admin get pods | grep $NAME | head -1 | awk '{print $1}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ELPA setup | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) | |
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) | |
(package-initialize) | |
;; Company setup |
I wrote in ~/.emacs.d/lisp/ros-cmake-mode.el:
(require 'cmake-mode)
(defun ros-cmake-indent ()
;; my code here...
)
;;;###autoload
I use dumb-jump, though I was unaware of the new changes as I probably use an older version.
Skimming the docs it encourages you to enable M-x dumb-jump-mode but the keymap does not
actually enable the xref bindings. The code says you must add dumb-jump-xref-activate
to xref-backend-functions
.
Try this:
(add-to-list 'xref-backend-functions 'dumb-jump-xref-activate t)
And then xref will fall back to dumb-jump when there are no better options. Edit: you may want to try with and without t as it appends, meaning dumb-jump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PORT=$1 | |
kill `lsof -t -i:$PORT` |