Fortunatly we could use pre-built gccemacs right now.
Those two repos did the greate job for us.
https://github.com/twlz0ne/nix-gccemacs-darwin
https://github.com/twlz0ne/nix-gccemacs-sierra
Here is the tutorial:
| #!/usr/bin/env bb | |
| ;; lein2deps | jet --pretty > deps.edn | |
| (require '[clojure.string :as str] | |
| '[clojure.edn :as edn]) | |
| (defn read-project-clj [] | |
| (-> "project.clj" | |
| slurp |
Fortunatly we could use pre-built gccemacs right now.
Those two repos did the greate job for us.
https://github.com/twlz0ne/nix-gccemacs-darwin
https://github.com/twlz0ne/nix-gccemacs-sierra
Here is the tutorial:
| (defun diff-last-two-kills (&optional ediff?) | |
| "Diff last couple of things in the kill-ring. With prefix open ediff." | |
| (interactive "P") | |
| (let* ((old "/tmp/old-kill") | |
| (new "/tmp/new-kill") | |
| (prev-ediff-quit-hook ediff-quit-hook)) | |
| (cl-flet ((kill-temps | |
| () | |
| (dolist (f (list old new)) | |
| (kill-buffer (find-buffer-visiting f))) |
It is possible to customize the behavior of org-insert-link, so for example when you insert a link in Org-mode (using C-c C-l) that is a URL to a GitHub issue or a GitHub PR, the description of that link automatically turns into the title of that GitHub item.
For the following snippet to work, you’d have to correctly set github-forge authentication. Which boils down to creating a personal access token on GitHub and adding the following line to your ~/.authinfo (or ~/.authinfo.gpg)
machine api.github.com login USERNAME^forge password TOKEN
| ;; If you subscribed to mailing list(s) in gnu.org or googlegroups.com | |
| ;; and using mu4e as your mailing app, very often you need to | |
| ;; find a message in lists.gnu.org/archive or googlegroups.com | |
| ;; | |
| ;; For example, when you don't have the context of a particular thread | |
| ;; and all prior messages got deleted locally. | |
| ;; | |
| ;; This mu4e action allows you | |
| ;; to quickly find selected email post in the archive | |
| ;; and open in the browser |
| (defun diff-buffers (buffer-A buffer-B) | |
| "Diff two buffers." | |
| (interactive | |
| (let* ((only-two? (eq 2 (count-windows))) | |
| (wins (sort (window-list) | |
| (lambda (a b) (< (window-use-time a) | |
| (window-use-time b))))) | |
| (b1 (if only-two? | |
| (window-buffer (first wins)) | |
| (read-buffer "Buffer A to compare"))) |
| #!/bin/sh | |
| #_( | |
| "exec" "clojure" "-Sdeps" "{:deps {org.clojure/clojurescript {:mvn/version \"1.10.520\"}}}" "$0" "$@" | |
| ) | |
| ;; running js_parser.clj "function foo(x) { var y = x + 1; }" will print: | |
| ;; [{:type :function, :name "foo", :body [{:variable-statement [{:lvalue "y", :initializer {:type :binary-op, :left "x", :operator "+", :right "1"}}]}], :params ["x"]}] | |
| # Install a fully encrypted ArchLinux on NVMe with detached LUKS | |
| # headers and LUKS encrypted UEFI boot partition on a USB dongle. | |
| # | |
| # Full tutorial can be found here: | |
| # https://headcrash.industries/reference/fully-encrypted-archlinux-with-secure-boot-on-yoga-920/ | |
| # | |
| # Written by Gerke Max Preussner <[email protected]> | |
| # Overview ############################################################ |
| (defn -js->clj+ | |
| "For cases when built-in js->clj doesn't work. Source: https://stackoverflow.com/a/32583549/4839573" | |
| [x] | |
| (into {} (for [k (js-keys x)] | |
| [k (aget x k)]))) | |
| (defn env | |
| "Returns current env vars as a Clojure map." | |
| [] | |
| (-js->clj+ (.-env js/process))) |
| (advice-remove 'kill-emacs 'spacemacs-really-exit) | |
| (defun ad-advice-kill-emacs (orig-fun) | |
| "Prompt before killing." | |
| (if (and (not spacemacs-really-kill-emacs) | |
| (spacemacs/persistent-server-running-p)) | |
| (when (y-or-n-p "Really kill frame?") | |
| (spacemacs/frame-killer)) | |
| (when (y-or-n-p "Really exit?") | |
| (funcall orig-fun)))) | |
| (advice-add 'kill-emacs :around 'ad-advice-kill-emacs) |