Skip to content

Instantly share code, notes, and snippets.

(defun telega--chat-observable-p (msg)
(let ((chat (telega-msg-chat msg)))
(with-telega-chatbuf chat
(and (telega-chatbuf--msg-observable-p msg)
(not (telega-chatbuf--history-state-get :newer-freezed))))))
(defun telega-notifications-msg-notify-p (msg)
"tychoish's custom override for notificationable"
(let* ((chat (telega-msg-chat msg))
(title (plist-get chat :title)))
(defun telega--chat-observable-p (msg)
(let ((chat (telega-msg-chat msg)))
(with-telega-chatbuf chat
(and (telega-chatbuf--msg-observable-p msg)
(not (telega-chatbuf--history-state-get :newer-freezed))))))
(defun telega-notifications-msg-notify-p (msg)
"tychoish's custom override for notificationable"
(let* ((chat (telega-msg-chat msg))
(title (plist-get chat :title)))
(defun ssh-reagent ()
(interactive)
(let* ((sshdir (car (directory-files "/tmp" nil "ssh-*")))
(agent (car (directory-files (concat "/tmp/" sshdir) nil "agent.*"))))
(setenv "SSH_AUTH_SOCK" (concat "/tmp/" sshdir "/" agent)))
(message "Attached to SSH Session"))
@tychoish
tychoish / dtor_test.go
Created March 21, 2022 19:55
The Very Mature Code I Just Wrote
func TestCleanupSUCKS(t *testing.T) {
t.Cleanup(func() { fmt.Println("cleanup") })
defer func() { fmt.Println("defer") }()
}
(defcommand dump-desktop-office ()()
(dump-desktop-to-filename (format nil "~a/layout/~a-office" *conf-dir* (machine-instance)))
(dump-window-placement-rules "office"))
(defcommand restore-desktop-office ()()
(restore-from-filename (format nil "~a/layout/~a-office" *conf-dir* (machine-instance))))
(defcommand dump-desktop-laptop ()()
(dump-desktop-to-filename (format nil "~a/layout/~a-laptop" *conf-dir* (machine-instance)))
(dump-window-placement-rules "laptop"))
(define-key *top-map* (kbd "XF86AudioLowerVolume") "volume-quiet")
(define-key *top-map* (kbd "XF86AudioRaiseVolume") "volume-loud")
(define-key *top-map* (kbd "XF86AudioMute") "volume-toggle")
(define-key *top-map* (kbd "F2") "lock")
(define-key *root-map* (kbd "TAB") "fselect")
(define-key *root-map* (kbd "C-TAB") "fother")
(define-key *root-map* (kbd "F6") "brightness-inc")
(define-key *root-map* (kbd "F5") "brightness-dec")
(set-prefix-key (kbd "C-q"))
;; Insertions into top level binding.
(define-key *top-map* (kbd "XF86AudioLowerVolume") "volume-quiet")
(define-key *top-map* (kbd "XF86AudioRaiseVolume") "volume-loud")
(define-key *top-map* (kbd "XF86AudioMute") "volume-toggle")
(define-key *top-map* (kbd "F2") "lock")
(defun tychoish-setup-user-local-config ()
"Ensure that all config files in the '~/.emacs.d/user' are loaded."
(let ((dirname (concat (expand-file-name user-emacs-directory) "user")))
(when (and (file-accessible-directory-p dirname)
(not (member dirname load-path)))
(add-to-list 'load-path dirname))
(mapc (lambda (fn)
(when (string-match-p "\\.el$" fn)
(require (intern (string-remove-suffix ".el" fn)))))
NAME-ERROR in current request Code 92.0 [LookupColor]
[Condition of type XLIB:NAME-ERROR]
Restarts:
0: [QUIT-STUMPWM] Quit Stumpwm
Backtrace:
0: (STUMPWM::ERROR-HANDLER #<XLIB:DISPLAY :0 (The X.Org Foundation R12008000)> XLIB:NAME-ERROR :ASYNCHRONOUS NIL :CURRENT-SEQUENCE 143 :MAJOR 92 :MINOR 0 :SEQUENCE 143)
Locals:
ASYNCHRONOUS = NIL
TODO(all): Schedule/scope/plan competitive analysis project/work
TODO(sam): Normalize outage handling and develop operations playbook
TODO(cris): notes on how to improve messaging skills (M15)
TODO(cris): ideas on distributing work effectively across teams (M18)
TODO(both): julian and kim box (we should do more to detail milestones/goals)
TODO(cris): details for communication (I27)
TODO(both): review emotional intelligence box (M30)