Skip to content

Instantly share code, notes, and snippets.

View display-buffer-in-side-window.el
(cl-defun ap/display-buffer-in-side-window (&optional (buffer (current-buffer)))
"Display BUFFER in dedicated side window."
(interactive)
(let ((display-buffer-mark-dedicated t))
(display-buffer-in-side-window buffer
'((side . right)
(window-parameters
(no-delete-other-windows . t))))))
@alphapapa
alphapapa / emacs-process-status-bug-ecm.el
Last active Aug 18, 2021
An ECM for a possible bug in Emacs's process-status code
View emacs-process-status-bug-ecm.el
;;; emacs-process-status-sentinel-ecm.el --- -*- lexical-binding: t; -*-
;; This file provides an ECM for a possible bug in Emacs's process
;; handling. The rub is whether a process sentinel may be called with
;; a STATUS string of "finished\n" while the process's
;; `process-status' is `open': If that is expected, then this may not
;; indicate a bug (but perhaps an issue that needs to be more
;; prominently documented). But if it's not supposed to happen, then
;; this may provide a means to reproduce the behavior and troubleshoot
;; the bug.
@alphapapa
alphapapa / .dockerignore
Created Jul 9, 2021 — forked from jscheid/.dockerignore
Running makem in Docker
View .dockerignore
Dockerfile
/.sandbox/
/.git/
@alphapapa
alphapapa / README.md
Created Jan 5, 2021 — forked from thibaudcolas/README.md
Video Downloader professional kmdldgcmokdpmacblnehppgkjphcbpnn background.js
View README.md

Video Downloader professional kmdldgcmokdpmacblnehppgkjphcbpnn background.js

This is the source of background.js for a now-unpublished Chrome extension called "Video Download professional" (ID kmdldgcmokdpmacblnehppgkjphcbpnn, since then replaced with another "Video Download professiona" (ID bacakpdjpomjaelpkpkabmedhkoongbi). This script is republished here for educational purposes. It has initially been extracted from the extension’s archive available as v2.4 on https://www.crx4chrome.com/.

Why is this interesting?

The extension has appeared in malware discussions in the past. Its replacement of Video downloader professional "bacakpdjpomjaelpkpkabmedhkoongbi" seems related to the ownership change of The Great Suspender.

What does t

@alphapapa
alphapapa / org-ql-rasmi.el
Created Dec 18, 2020 — forked from mskorzhinskiy/org-ql-rasmi.el
Current configuration for personal org queries
View org-ql-rasmi.el
(setq
org-ql-views
'(("stuck" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (tags "story")
(not (tags "ignore"))
(not (done)) ;; Finished stories should be excluded
(not (descendants (todo "NEXT"))) ;; If there are already
@alphapapa
alphapapa / emacsconf2020poster.svg
Created Nov 11, 2020
EmacsConf 2020 poster design
View emacsconf2020poster.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alphapapa
alphapapa / dired.sh
Last active Apr 4, 2021
Standalone Dired launcher
View dired.sh
#!/bin/bash
# Launch Dired in a plain Emacs configuration.
# Arguments are passed to Emacs, e.g. "-nw" works as expected.
emacs -q "$@" \
--eval "(dired default-directory)" \
--eval "(defun kill-window-or-emacs () (interactive) (if (one-window-p) (kill-emacs) (delete-window)))" \
--eval "(setq dired-dwim-target t delete-by-moving-to-trash t)" \
@alphapapa
alphapapa / native-comp-convenience.org
Created Sep 19, 2020
Emacs native-comp branch convenience c ode
View native-comp-convenience.org

Emacs native-comp Recipes

For lack of a better term.

Update Docker image

  1. Update Andrea’s image.
@alphapapa
alphapapa / emacs-27-svg-screenshot.svg
Last active Aug 22, 2020
Emacs 27 can take SVG screenshots of itself
View emacs-27-svg-screenshot.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:f9a42ba4978048512047890dc5b2c1b9
- command-execute 207 89%
- call-interactively 207 89%
- funcall-interactively 146 63%
- execute-extended-command 116 50%
- sit-for 61 26%
- redisplay 49 21%
- redisplay_internal (C function) 4 1%
- funcall 4 1%
- #<compiled 0x26ac9b> 4 1%
- gui-backend-selection-exists-p 4 1%