Skip to content

Instantly share code, notes, and snippets.

View mskorzhinskiy's full-sized avatar

Mikhail Skorzhinskii mskorzhinskiy

View GitHub Profile
@mskorzhinskiy
mskorzhinskiy / config.org
Created March 4, 2024 20:50
Doom Emacs Configuration

DOOM Configuration

Description

Literature configuration made for doom emacs.

(setq user-full-name    "Mikhail Skorzhisnkii")
@mskorzhinskiy
mskorzhinskiy / org-attach-id-human-readable.el
Created January 23, 2023 07:09
My take on generating human-readable attach id's for org-attach
(use-package ffap)
(defun sanitze-string (str)
"Returns a string which contains only a-zA-Z0-9 with single dashes
replacing all other characters in-between them.
Some parts were copied and adapted from org-hugo-slug
from https://github.com/kaushalmodi/ox-hugo (GPLv3)."
(let* (;; Remove "<FOO>..</FOO>" HTML tags if present.
(str (replace-regexp-in-string "<\\(?1:[a-z]+\\)[^>]*>.*</\\1>" "" str))
@mskorzhinskiy
mskorzhinskiy / org-attach-check-orphan.pl
Created January 14, 2023 16:31
Various helpers for org-attach feature
#!/bin/env perl
#
# This will try to find orphaned attachments in folder ~/org/storage
# using first argument to this script as a location where org files
# are
#
# Note, I haven't used this function in a while, unsure if it still works
# with most recent org versions...
use strict;
@mskorzhinskiy
mskorzhinskiy / org-ids.el
Created July 13, 2021 19:09
My approach to make readable IDs in org-mode and make sensible directory names in org-attach folders
;; Taken from https://github.com/novoid/dot-emacs/blob/master/config.org
(defun my-generate-sanitized-alnum-dash-string (str)
"Returns a string which contains only a-zA-Z0-9 with single dashes
replacing all other characters in-between them.
Some parts were copied and adapted from org-hugo-slug
from https://github.com/kaushalmodi/ox-hugo (GPLv3)."
(let* (;; Remove "<FOO>..</FOO>" HTML tags if present.
(str (replace-regexp-in-string "<\\(?1:[a-z]+\\)[^>]*>.*</\\1>" "" str))
;; Remove org-mode links
@mskorzhinskiy
mskorzhinskiy / org-ql-rasmi.el
Created December 18, 2020 09:15
Current configuration for personal org queries
(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
@mskorzhinskiy
mskorzhinskiy / ricing.el
Created September 1, 2020 09:31
Doom emacs org-mode ricing
;; Font
(setq doom-font "Iosevka-9")
;; Hide signs like "~" or "_" or "*"
(setq org-hide-emphasis-markers t)
;; Don't align tags
(setq org-tags-column 0)
;; Increase indenation in org-indent
@mskorzhinskiy
mskorzhinskiy / emacs-org-attach-file.sh
Created June 28, 2020 21:43
Helper to attach files to org-mode
#!/bin/bash
# Author: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
#
# Description: Create a new file for org-mode and (may-be) try to attach it to
# the org-mode
choice=`kdialog --radiolist Type: Drawing Drawing on Screenshot Screenshot off Voice Voice off`
file_name=`uuidgen`
@mskorzhinskiy
mskorzhinskiy / org-new-navigation.el
Created April 22, 2020 12:33
Customized navigation for org-mode
;; New navigation/edition
(defmacro org-user/save-state (&rest body)
"Helper for executing BODY with macroses."
(declare (debug (body)))
`(save-excursion
(save-restriction
(org-save-outline-visibility nil
,@body))))
@mskorzhinskiy
mskorzhinskiy / rofi-help.txt
Created January 30, 2017 13:37
Rofi configuration for bug report
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@mskorzhinskiy
mskorzhinskiy / vimrc.vim
Created December 4, 2016 17:37
My old vimrc file (used for Perl projects)
""""""""""""""""""""""""""""""""""""""""""""""""
" File: .vimrc "
" Create Date: Nov 04, 2010 "
" Author: Michail Skorzinskiy "
" email : rasmikun@gmail.com "
" jabber: rasmikun@gmail.com "
""""""""""""""""""""""""""""""""""""""""""""""""