This file contains hidden or 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
(global-set-key (kbd "s-d") 'mc/mark-next-like-this-word) | |
(global-set-key (kbd "s-k") nil) | |
(global-set-key (kbd "s-k s-d") 'mc/skip-to-next-like-this) | |
(global-set-key (kbd "s-k s-u") 'mc/unmark-next-like-this) | |
(define-key mc/keymap (kbd "<return>") nil) | |
(global-unset-key (kbd "s-<down-mouse-1>")) | |
(global-set-key (kbd "s-<mouse-1>") 'mc/add-cursor-on-click) |
This file contains hidden or 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
sudo iptables-save | awk '/^[*]/ { print $1 } | |
/^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } | |
/COMMIT/ { print $0; }' | sudo iptables-restore | |
sudo iptables-legacy-save | awk '/^[*]/ { print $1 } | |
/^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } | |
/COMMIT/ { print $0; }' | sudo iptables-legacy-restore | |
sudo iptables-save |
This file contains hidden or 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
# Source: stack/templates/stack.yml | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: ant-media-loadbalancer-udp | |
spec: | |
loadBalancerIP: REDACTED | |
ports: | |
- name: udp-5000 | |
port: 5000 |
This file contains hidden or 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
;;; files.el --- file input and output commands for Emacs -*- lexical-binding:t -*- | |
;; Copyright (C) 1985-1987, 1992-2020 Free Software Foundation, Inc. | |
;; Maintainer: [email protected] | |
;; Package: emacs | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software: you can redistribute it and/or modify |
This file contains hidden or 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
(defun my-org-occur-backlinks () | |
"Find links in org files which link to the current location." | |
(interactive) | |
(let ((id (org-id-get)) | |
(heading (nth 4 (org-heading-components)))) | |
(org-occur-in-agenda-files | |
(if id | |
(concat id "\\|" heading) | |
heading)))) |
This file contains hidden or 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
(defun org-sync-attachments () | |
"Update the current entry's attachment metadata." | |
(interactive) | |
(let* ((attachments (if (org-attach-dir) | |
(org-attach-file-list (org-attach-dir)))) | |
(tag-state (if attachments 'on 'off)) | |
(org-attach-file-list-property "Attachments")) | |
(if attachments | |
(org-set-property org-attach-file-list-property |
This file contains hidden or 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
helm ls -A | awk 'NR > 1 { print "helm -n " $2 " get values " $1 " > " $2 "_____" $1 ".yaml" }' > run.sh && source run.sh |
This file contains hidden or 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
(defvar helm-source-lens-kubeconfigs nil "Lens kubeconfigs source") | |
(defun my/kubel-with-lens-configs (&optional kubeconfigs-dir) | |
"Launch kubel with Lens configs. | |
Require `yq' (a wrapper of `jq' for `yaml') in your path." | |
(interactive) | |
(unless kubeconfigs-dir | |
(setq kubeconfigs-dir "~/Library/Application Support/Lens/kubeconfigs")) | |
This file contains hidden or 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
(setq tab-line-close-tab-function | |
#'(lambda (tab) | |
"Delete window when the last tab buried." | |
(let* ((buffer (if (bufferp tab) tab (cdr (assq 'buffer tab)))) | |
(window (get-buffer-window buffer))) | |
(with-selected-window (or window (selected-window)) | |
(let ((last-tab-p (length< (tab-line-tabs-window-buffers) 2))) | |
(if (eq buffer (current-buffer)) | |
(bury-buffer) | |
(set-window-prev-buffers nil (assq-delete-all buffer (window-prev-buffers))) |
This file contains hidden or 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
local clockingLog = hs.logger.new("clocking") | |
local clockingMenu = hs.menubar.new() | |
local currentTask = nil | |
local function trim(s) | |
return (s:gsub("^%s*(.-)%s*$", "%1")) | |
end | |
local function eval(sexp, callback) | |
hs.task.new( |