Skip to content

Instantly share code, notes, and snippets.

;;; Rebind 'GOTO beginning/end of buffer' to "C-M-v"
(defun edge-of-buffer ()
(interactive)
(if (and current-prefix-arg (eq current-prefix-arg '-))
(beginning-of-buffer) (end-of-buffer)))
(global-set-key (kbd "C-M-v") 'edge-of-buffer)
;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html
(desktop-save-mode 1)
;;; Display a list of existing buffers in current window
(global-set-key (kbd "C-x C-b") 'buffer-menu)
;; List buffers in other window using "C-x 4-" prefix
(global-set-key (kbd "C-x 4 C-x C-b") 'list-buffers)
;;; Show directories first in Dired
(setq dired-listing-switches "-al --group-directories-first")
(defun graphviz-on-buffer ()
(interactive)
(shell-command-on-region (point-min) (point-max) "dot -Txlib"))
;;; Relative line numbers
(setq display-line-numbers-type 'relative)
(global-display-line-numbers-mode)
;; Move toward logical lines when prefix arg (numeric, negative) is presented
(defun next-logical-line-if-prefix (&optional arg try-vscroll)
(interactive "^p\np")
(let ((line-move-visual (if current-prefix-arg nil line-move-visual)))
(with-no-warnings
(next-line arg try-vscroll))))

Приближенные алгоритмы

Определения

  • Задача
    • список всех ее параметров
    • формулировка свойств, которым должен удовлетворять ответ (решение) задачи
  • Индивидуальная задача
    • Задача, параметрам которой присвоили конкретные значения

Static type checking for the Algorithmic Language Scheme

Authors:

  • Nikita Medvedev
  • Anton Zavyalov

Prerequirements

  • Schasm - Scheme to WebAssembly compiler
    • Software Development Tech course, 2021
@andiogenes
andiogenes / with-env.clj
Last active May 16, 2022 08:45
Poor man's direnv
#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]]
'[clojure.java.io :as io]
'[clojure.edn :as edn])
(def usage-line
"Usage: with-env [arg*]
\rExtends environment with variables obtained from 'env.edn' file,
@andiogenes
andiogenes / keyboard-manager.clj
Last active May 13, 2022 13:45
Keyboard Management with Babashka and X Keyboard Extension
#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]])
(def usage-line
"Usage: keyboard-manager [command*]
\rPossible commands:
\r * nocaps (n) - use Caps Lock as Ctrl