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
(make-network-process :name "rmacs" | |
:server t | |
:host 'local | |
:service 52699 | |
:filter #'(lambda (proc string) | |
(delete-process proc) | |
(raise-frame) | |
(let ((tramp-allow-unsafe-temporary-files t)) | |
(find-file (string-trim string))))) | |
;; (delete-process "rmacs") |
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
function tl() { | |
tldr --list | awk -v RS=', |\n' '/^[^\s]/ { print }' \ | |
| fzf --preview 'tldr {}' --query "$1" \ | |
| xargs -I{} tldr '{}' | |
} |
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
(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 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 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 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: emacs-devel@gnu.org | |
;; Package: emacs | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software: you can redistribute it and/or modify |
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
# 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 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 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 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
<?php | |
function adminer_object() { | |
class AdminerSoftware extends Adminer { | |
function login($login, $password) { | |
return true; | |
} | |
} | |
return new AdminerSoftware; | |
} | |
include "./adminer-4.2.5.php"; |